@editora/ui-core 0.1.13 → 0.1.14

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 (73) hide show
  1. package/README.md +96 -6
  2. package/dist/color-picker.cjs.js +1 -1
  3. package/dist/color-picker.esm.js +2 -1
  4. package/dist/components/date-time-utils.d.ts.map +1 -1
  5. package/dist/components/ui-context-menu.d.ts +6 -0
  6. package/dist/components/ui-context-menu.d.ts.map +1 -1
  7. package/dist/components/ui-floating-toolbar.d.ts +3 -0
  8. package/dist/components/ui-floating-toolbar.d.ts.map +1 -1
  9. package/dist/components/ui-gantt.d.ts +30 -1
  10. package/dist/components/ui-gantt.d.ts.map +1 -1
  11. package/dist/components/ui-hover-card.d.ts +3 -0
  12. package/dist/components/ui-hover-card.d.ts.map +1 -1
  13. package/dist/components/ui-positioner.d.ts.map +1 -1
  14. package/dist/context-menu.cjs.js +12 -12
  15. package/dist/context-menu.esm.js +159 -132
  16. package/dist/date-field.cjs.js +1 -1
  17. package/dist/date-field.esm.js +2 -1
  18. package/dist/date-picker.cjs.js +1 -1
  19. package/dist/date-picker.esm.js +2 -1
  20. package/dist/date-range-picker.cjs.js +1 -1
  21. package/dist/date-range-picker.esm.js +2 -1
  22. package/dist/date-range-time-picker.cjs.js +2 -2
  23. package/dist/date-range-time-picker.esm.js +2 -1
  24. package/dist/date-time-picker.cjs.js +2 -2
  25. package/dist/date-time-picker.esm.js +2 -1
  26. package/dist/date-time-utils-66480de4.js +1 -0
  27. package/dist/date-time-utils-a2c7af25.mjs +307 -0
  28. package/dist/floating-toolbar.cjs.js +4 -4
  29. package/dist/floating-toolbar.esm.js +52 -25
  30. package/dist/gantt.cjs.js +656 -74
  31. package/dist/gantt.esm.js +1050 -100
  32. package/dist/hover-card.cjs.js +4 -4
  33. package/dist/hover-card.esm.js +61 -38
  34. package/dist/index.cjs.js +1 -1
  35. package/dist/index.esm.js +158 -146
  36. package/dist/menu.cjs.js +1 -1
  37. package/dist/menu.esm.js +2 -2
  38. package/dist/menubar.cjs.js +1 -1
  39. package/dist/menubar.esm.js +2 -2
  40. package/dist/popover.cjs.js +1 -1
  41. package/dist/popover.esm.js +2 -2
  42. package/dist/portal-c69756c0.js +1 -0
  43. package/dist/portal-fe73e5cc.mjs +123 -0
  44. package/dist/portal.d.ts +29 -3
  45. package/dist/portal.d.ts.map +1 -1
  46. package/dist/positioner-33529bb8.js +1 -0
  47. package/dist/positioner-e9770c66.mjs +582 -0
  48. package/dist/positioner.cjs.js +2 -2
  49. package/dist/positioner.esm.js +36 -26
  50. package/dist/primitives/positioner.d.ts +199 -1
  51. package/dist/primitives/positioner.d.ts.map +1 -1
  52. package/dist/{runtime-864efe2f.mjs → runtime-161f68a2.mjs} +24 -23
  53. package/dist/runtime-3f13807b.js +1 -0
  54. package/dist/runtime.cjs.js +1 -1
  55. package/dist/runtime.d.ts +2 -0
  56. package/dist/runtime.d.ts.map +1 -1
  57. package/dist/runtime.esm.js +39 -24
  58. package/dist/split-button.cjs.js +1 -1
  59. package/dist/split-button.esm.js +2 -2
  60. package/dist/time-field.cjs.js +1 -1
  61. package/dist/time-field.esm.js +14 -13
  62. package/dist/time-picker.cjs.js +1 -1
  63. package/dist/time-picker.esm.js +2 -1
  64. package/dist/tooltip.cjs.js +1 -1
  65. package/dist/tooltip.esm.js +2 -1
  66. package/package.json +2 -2
  67. package/dist/date-time-utils-378ecc21.js +0 -1
  68. package/dist/date-time-utils-a8b17ea7.mjs +0 -299
  69. package/dist/portal-9060f7a6.mjs +0 -114
  70. package/dist/portal-d9bae456.js +0 -1
  71. package/dist/positioner-16f3cca1.mjs +0 -132
  72. package/dist/positioner-43b1c75a.js +0 -1
  73. package/dist/runtime-668914fe.js +0 -1
@@ -1,17 +1,18 @@
1
- import { E as A } from "./ElementBase-909688f3.mjs";
2
- import { c as S } from "./portal-9060f7a6.mjs";
3
- import { c as w } from "./dismissable-layer-9c7e6b58.mjs";
4
- import { c as P } from "./menu-item-styles-27fdbac4.mjs";
1
+ import { E } from "./ElementBase-909688f3.mjs";
2
+ import { c as A } from "./portal-fe73e5cc.mjs";
3
+ import { c as S } from "./dismissable-layer-9c7e6b58.mjs";
4
+ import { l as P } from "./positioner-e9770c66.mjs";
5
+ import { c as w } from "./menu-item-styles-27fdbac4.mjs";
5
6
  import "./listbox-308789a0.mjs";
6
7
  import "./collection-a1aac0c6.mjs";
7
8
  import "./collection.esm.js";
8
- const p = '.menuitem, [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [data-menu-item]', b = [
9
+ const c = '.menuitem, [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [data-menu-item]', b = [
9
10
  ":scope > .menuitem",
10
11
  ':scope > [role="menuitem"]',
11
12
  ':scope > [role="menuitemcheckbox"]',
12
13
  ':scope > [role="menuitemradio"]',
13
14
  ":scope > [data-menu-item]"
14
- ].join(", "), L = ":scope > .submenu", u = 8, O = 6, C = 420, I = 110, k = [
15
+ ].join(", "), O = ":scope > .submenu", l = 8, L = 6, R = 420, C = 110, I = [
15
16
  "--ui-color-primary",
16
17
  "--ui-color-primary-hover",
17
18
  "--ui-color-foreground-on-primary",
@@ -46,7 +47,7 @@ const p = '.menuitem, [role="menuitem"], [role="menuitemcheckbox"], [role="menui
46
47
  "--accent-surface",
47
48
  "--accent-indicator",
48
49
  "--accent-track"
49
- ], R = [
50
+ ], k = [
50
51
  { prefix: "--accent-", from: 1, to: 12 },
51
52
  { prefix: "--accent-a", from: 1, to: 12 },
52
53
  { prefix: "--gray-", from: 1, to: 12 },
@@ -70,7 +71,7 @@ const p = '.menuitem, [role="menuitem"], [role="menuitemcheckbox"], [role="menui
70
71
  "--base-context-menu-item-line-height",
71
72
  "--base-context-menu-submenu-radius",
72
73
  "--base-context-menu-submenu-padding"
73
- ], v = `
74
+ ], g = `
74
75
  :host {
75
76
  position: fixed;
76
77
  inset: 0;
@@ -352,14 +353,14 @@ const p = '.menuitem, [role="menuitem"], [role="menuitemcheckbox"], [role="menui
352
353
  --ui-context-menu-status-border: color-mix(in srgb, #16a34a 46%, var(--ui-context-menu-border-color));
353
354
  --ui-context-menu-status-text: #15803d;
354
355
  }
355
- `, E = `
356
+ `, v = `
356
357
  ui-context-menu [slot="menu"],
357
358
  ui-context-menu [slot="content"] {
358
359
  display: flex;
359
360
  flex-direction: column;
360
361
  gap: 0;
361
362
  }
362
- ${P({
363
+ ${w({
363
364
  scopes: ['ui-context-menu [slot="menu"]', 'ui-context-menu [slot="content"]'],
364
365
  prefix: "--ui-context-menu",
365
366
  itemSelectors: [".menuitem", '[role="menuitem"]', '[role="menuitemcheckbox"]', '[role="menuitemradio"]', "[data-menu-item]"],
@@ -417,104 +418,83 @@ const p = '.menuitem, [role="menuitem"], [role="menuitemcheckbox"], [role="menui
417
418
  function z() {
418
419
  if (typeof document > "u")
419
420
  return;
420
- const s = "ui-context-menu-light-dom-style";
421
- if (document.getElementById(s))
421
+ const o = "ui-context-menu-light-dom-style";
422
+ if (document.getElementById(o))
422
423
  return;
423
424
  const t = document.createElement("style");
424
- t.id = s, t.textContent = E, document.head.appendChild(t);
425
+ t.id = o, t.textContent = v, document.head.appendChild(t);
425
426
  }
426
- function B(s, t) {
427
- return s.replace(/(^|})\s*([^@}{][^{}]*)\{/g, (e, i, n) => {
428
- const o = n.split(",").map((r) => r.trim()).filter(Boolean).map((r) => r.startsWith(t) ? r : `${t} ${r}`).join(", ");
427
+ function B(o, t) {
428
+ return o.replace(/(^|})\s*([^@}{][^{}]*)\{/g, (e, i, n) => {
429
+ const s = n.split(",").map((r) => r.trim()).filter(Boolean).map((r) => r.startsWith(t) ? r : `${t} ${r}`).join(", ");
429
430
  return `${i}
430
- ${o} {`;
431
+ ${s} {`;
431
432
  });
432
433
  }
433
- function F(s) {
434
- const t = s.replace(/:host\(\[([a-z-]+)(?:="([^"]+)")?\]\)/g, (e, i, n) => n != null ? `.ui-context-menu-portal[data-${i}="${n}"]` : `.ui-context-menu-portal[data-${i}="true"]`).replace(/:host/g, ".ui-context-menu-portal");
434
+ function F(o) {
435
+ const t = o.replace(/:host\(\[([a-z-]+)(?:="([^"]+)")?\]\)/g, (e, i, n) => n != null ? `.ui-context-menu-portal[data-${i}="${n}"]` : `.ui-context-menu-portal[data-${i}="true"]`).replace(/:host/g, ".ui-context-menu-portal");
435
436
  return B(t, ".ui-context-menu-portal");
436
437
  }
437
- function H(s) {
438
- return s.replace(/(^|,)\s*ui-context-menu\b/gm, (t, e) => `${e} .ui-context-menu-portal`);
438
+ function H(o) {
439
+ return o.replace(/(^|,)\s*ui-context-menu\b/gm, (t, e) => `${e} .ui-context-menu-portal`);
439
440
  }
440
- const D = `${F(v)}
441
- ${H(E)}`;
442
- function y(s, t, e) {
443
- return Math.min(e, Math.max(t, s));
441
+ const D = `${F(g)}
442
+ ${H(v)}`;
443
+ function M(o) {
444
+ return o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
444
445
  }
445
- function M(s) {
446
- return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
446
+ function q(o, t) {
447
+ return typeof o == "number" ? { x: o, y: typeof t == "number" ? t : 0 } : o;
447
448
  }
448
- function q(s, t) {
449
- return typeof s == "number" ? { x: s, y: typeof t == "number" ? t : 0 } : s;
449
+ function $(o) {
450
+ return o === "top" || o === "left" || o === "right" ? o : "bottom";
450
451
  }
451
- function $(s) {
452
- return s === "top" || s === "left" || s === "right" ? s : "bottom";
452
+ function V(o) {
453
+ return `${o}-start`;
453
454
  }
454
- function _(s) {
455
- if (!s)
455
+ function _(o) {
456
+ if (!o)
456
457
  return "";
457
- const t = s.trim().toLowerCase();
458
+ const t = o.trim().toLowerCase();
458
459
  return t === "1" ? "sm" : t === "2" ? "md" : t === "3" ? "lg" : t === "sm" || t === "md" || t === "lg" ? t : t === "compact" ? "sm" : t === "comfortable" ? "lg" : "";
459
460
  }
460
- function g(s) {
461
- if (!s)
461
+ function y(o) {
462
+ if (!o)
462
463
  return "";
463
- const t = s.trim().toLowerCase();
464
- return t ? t === "none" ? "0px" : t === "sm" ? "8px" : t === "md" ? "12px" : t === "lg" ? "16px" : t === "full" ? "999px" : t === "square" ? "6px" : t === "soft" ? "16px" : /^\d+(\.\d+)?$/.test(t) ? `${t}px` : s : "";
464
+ const t = o.trim().toLowerCase();
465
+ return t ? t === "none" ? "0px" : t === "sm" ? "8px" : t === "md" ? "12px" : t === "lg" ? "16px" : t === "full" ? "999px" : t === "square" ? "6px" : t === "soft" ? "16px" : /^\d+(\.\d+)?$/.test(t) ? `${t}px` : o : "";
465
466
  }
466
- function V(s) {
467
- if (!s.isConnected || s.hidden)
467
+ function N(o) {
468
+ if (!o.isConnected || o.hidden)
468
469
  return !1;
469
- const t = window.getComputedStyle(s);
470
+ const t = window.getComputedStyle(o);
470
471
  return !(t.display === "none" || t.visibility === "hidden");
471
472
  }
472
- function N(s) {
473
- if (!s.isConnected)
473
+ function W(o) {
474
+ if (!o.isConnected)
474
475
  return !1;
475
- const t = window.getComputedStyle(s);
476
+ const t = window.getComputedStyle(o);
476
477
  if (t.display === "none" || t.visibility === "hidden")
477
478
  return !1;
478
- const e = s.getBoundingClientRect();
479
+ const e = o.getBoundingClientRect();
479
480
  if (e.width > 0 || e.height > 0)
480
481
  return !0;
481
482
  const i = Number.parseFloat(t.width || "0"), n = Number.parseFloat(t.height || "0");
482
483
  return i > 0 || n > 0;
483
484
  }
484
- function x(s) {
485
- const t = s.getAttribute("aria-disabled");
486
- return s.hasAttribute("disabled") || t === "true" || s.disabled === !0;
485
+ function x(o) {
486
+ const t = o.getAttribute("aria-disabled");
487
+ return o.hasAttribute("disabled") || t === "true" || o.disabled === !0;
487
488
  }
488
- function G(s) {
489
- for (const t of s)
490
- if (t instanceof HTMLElement && t.matches(p))
489
+ function G(o) {
490
+ for (const t of o)
491
+ if (t instanceof HTMLElement && t.matches(c))
491
492
  return t;
492
493
  return null;
493
494
  }
494
- function W(s) {
495
- return {
496
- top: s.y,
497
- left: s.x,
498
- right: s.x,
499
- bottom: s.y,
500
- width: 0,
501
- height: 0
502
- };
503
- }
504
- function U(s, t, e, i, n) {
505
- const o = window.innerWidth || document.documentElement.clientWidth || 0, r = window.innerHeight || document.documentElement.clientHeight || 0, a = Math.max(u, o - t - u), c = Math.max(u, r - e - u);
506
- let l = i, h = i === "left" ? s.left - t - n : i === "right" ? s.right + n : s.left, m = i === "top" ? s.top - e - n : i === "bottom" ? s.bottom + n : s.top;
507
- return i === "top" || i === "bottom" ? l === "bottom" && m + e > r - u && s.top - e - n >= u ? (l = "top", m = s.top - e - n) : l === "top" && m < u && s.bottom + n + e <= r - u && (l = "bottom", m = s.bottom + n) : (i === "left" || i === "right") && (l === "right" && h + t > o - u && s.left - t - n >= u ? (l = "left", h = s.left - t - n) : l === "left" && h < u && s.right + n + t <= o - u && (l = "right", h = s.right + n)), h = y(h, u, a), m = y(m, u, c), {
508
- x: Math.round(h),
509
- y: Math.round(m),
510
- placement: l,
511
- maxWidth: Math.max(160, o - u * 2),
512
- maxHeight: Math.max(120, r - u * 2)
513
- };
514
- }
515
- class Y extends A {
495
+ class U extends E {
516
496
  constructor() {
517
- super(), this._isOpen = !1, this._anchorEl = null, this._point = { x: 0, y: 0 }, this._restoreFocusEl = null, this._portalEl = null, this._portalSurfaceEl = null, this._portalContentHostEl = null, this._dismissableLayer = null, this._contentAnchor = null, this._contentSourceEl = null, this._contentOriginalParent = null, this._positionRaf = null, this._submenuRaf = null, this._anchorTrackRaf = null, this._typeaheadBuffer = "", this._typeaheadTimer = null, this._submenuIntentTimer = null, this._submenuIntentItem = null, this._hoveredItem = null, this._lastAnchorRect = null, this._resizeListenerBound = !1, this._scrollListenerBound = !1, this._nextOpenSource = "attribute", this._onRootClick = this._onRootClick.bind(this), this._onRootKeyDown = this._onRootKeyDown.bind(this), this._onRootPointerOver = this._onRootPointerOver.bind(this), this._onRootPointerLeave = this._onRootPointerLeave.bind(this), this._onRootFocusIn = this._onRootFocusIn.bind(this), this._onContextMenu = this._onContextMenu.bind(this), this._onViewportChange = this._onViewportChange.bind(this), this._trackAnchorLayout = this._trackAnchorLayout.bind(this);
497
+ super(), this._isOpen = !1, this._anchorEl = null, this._point = { x: 0, y: 0 }, this._restoreFocusEl = null, this._portalEl = null, this._portalSurfaceEl = null, this._portalContentHostEl = null, this._dismissableLayer = null, this._positioner = null, this._positionerPlacement = null, this._positionerOffset = 0, this._positionerAnchorEl = null, this._contentAnchor = null, this._contentSourceEl = null, this._contentOriginalParent = null, this._positionRaf = null, this._submenuRaf = null, this._anchorTrackRaf = null, this._typeaheadBuffer = "", this._typeaheadTimer = null, this._submenuIntentTimer = null, this._submenuIntentItem = null, this._hoveredItem = null, this._lastAnchorRect = null, this._resizeListenerBound = !1, this._scrollListenerBound = !1, this._nextOpenSource = "attribute", this._onRootClick = this._onRootClick.bind(this), this._onRootKeyDown = this._onRootKeyDown.bind(this), this._onRootPointerOver = this._onRootPointerOver.bind(this), this._onRootPointerLeave = this._onRootPointerLeave.bind(this), this._onRootFocusIn = this._onRootFocusIn.bind(this), this._onContextMenu = this._onContextMenu.bind(this), this._onViewportChange = this._onViewportChange.bind(this), this._trackAnchorLayout = this._trackAnchorLayout.bind(this);
518
498
  }
519
499
  static get observedAttributes() {
520
500
  return [
@@ -703,7 +683,7 @@ class Y extends A {
703
683
  _syncVisualState() {
704
684
  const t = _(this.getAttribute("size") || this.getAttribute("density"));
705
685
  t && t !== "md" ? this.setAttribute("data-ui-context-menu-size", t) : this.removeAttribute("data-ui-context-menu-size"), t === "sm" ? (this.style.setProperty("--ui-context-menu-padding", "4px"), this.style.setProperty("--ui-context-menu-item-gap", "8px"), this.style.setProperty("--ui-context-menu-item-min-height", "32px"), this.style.setProperty("--ui-context-menu-item-pad-y", "6px"), this.style.setProperty("--ui-context-menu-item-pad-x", "8px"), this.style.setProperty("--ui-context-menu-item-font-size", "13px"), this.style.setProperty("--ui-context-menu-item-line-height", "18px"), this.style.setProperty("--ui-context-menu-separator-margin", "4px 8px")) : t === "lg" ? (this.style.setProperty("--ui-context-menu-padding", "8px"), this.style.setProperty("--ui-context-menu-item-gap", "12px"), this.style.setProperty("--ui-context-menu-item-min-height", "40px"), this.style.setProperty("--ui-context-menu-item-pad-y", "9px"), this.style.setProperty("--ui-context-menu-item-pad-x", "12px"), this.style.setProperty("--ui-context-menu-item-font-size", "15px"), this.style.setProperty("--ui-context-menu-item-line-height", "22px"), this.style.setProperty("--ui-context-menu-separator-margin", "8px 12px")) : (this.style.removeProperty("--ui-context-menu-padding"), this.style.removeProperty("--ui-context-menu-item-gap"), this.style.removeProperty("--ui-context-menu-item-min-height"), this.style.removeProperty("--ui-context-menu-item-pad-y"), this.style.removeProperty("--ui-context-menu-item-pad-x"), this.style.removeProperty("--ui-context-menu-item-font-size"), this.style.removeProperty("--ui-context-menu-item-line-height"), this.style.removeProperty("--ui-context-menu-separator-margin"));
706
- const e = g(this.getAttribute("radius") || this.getAttribute("shape"));
686
+ const e = y(this.getAttribute("radius") || this.getAttribute("shape"));
707
687
  e ? (this.style.setProperty("--ui-context-menu-radius", e), this.style.setProperty("--ui-context-menu-item-radius", e), this.style.setProperty("--ui-context-menu-submenu-radius", e)) : (this.style.removeProperty("--ui-context-menu-radius"), this.style.removeProperty("--ui-context-menu-item-radius"), this.style.removeProperty("--ui-context-menu-submenu-radius"));
708
688
  }
709
689
  _syncGlobalListeners(t) {
@@ -729,20 +709,20 @@ class Y extends A {
729
709
  const n = t.getPropertyValue(i).trim();
730
710
  n ? this._portalEl.style.setProperty(i, n) : this._portalEl.style.removeProperty(i);
731
711
  };
732
- k.forEach(e), T.forEach(e), R.forEach(({ prefix: i, from: n, to: o }) => {
733
- for (let r = n; r <= o; r += 1)
712
+ I.forEach(e), T.forEach(e), k.forEach(({ prefix: i, from: n, to: s }) => {
713
+ for (let r = n; r <= s; r += 1)
734
714
  e(`${i}${r}`);
735
715
  });
736
716
  }
737
717
  _syncPortalVisualState() {
738
718
  if (!this._portalEl)
739
719
  return;
740
- const t = _(this.getAttribute("size") || this.getAttribute("density")), e = g(this.getAttribute("radius") || this.getAttribute("shape"));
720
+ const t = _(this.getAttribute("size") || this.getAttribute("density")), e = y(this.getAttribute("radius") || this.getAttribute("shape"));
741
721
  this._syncPortalThemeVariables(), this._setPortalFlag("open", this._isOpen), this._setPortalFlag("headless", this.headless), this._setPortalFlag("disabled", this.isDisabled);
742
- const i = this.getAttribute("variant"), n = _(this.getAttribute("size") || this.getAttribute("density")), o = this.getAttribute("density"), r = this.getAttribute("radius"), a = this.getAttribute("shape"), c = this.getAttribute("elevation"), l = this.getAttribute("tone"), h = this.getAttribute("placement");
743
- i ? this._portalEl.setAttribute("data-variant", i) : this._portalEl.removeAttribute("data-variant"), n && n !== "md" ? this._portalEl.setAttribute("data-size", n) : this._portalEl.removeAttribute("data-size"), o ? this._portalEl.setAttribute("data-density", o) : this._portalEl.removeAttribute("data-density"), r ? this._portalEl.setAttribute("data-radius", r) : this._portalEl.removeAttribute("data-radius"), a ? this._portalEl.setAttribute("data-shape", a) : this._portalEl.removeAttribute("data-shape"), c ? this._portalEl.setAttribute("data-elevation", c) : this._portalEl.removeAttribute("data-elevation"), l ? this._portalEl.setAttribute("data-tone", l) : this._portalEl.removeAttribute("data-tone"), h ? this._portalEl.setAttribute("data-placement-request", h) : this._portalEl.removeAttribute("data-placement-request"), t === "sm" ? (this._portalEl.style.setProperty("--ui-context-menu-padding", "4px"), this._portalEl.style.setProperty("--ui-context-menu-item-gap", "8px"), this._portalEl.style.setProperty("--ui-context-menu-item-min-height", "32px"), this._portalEl.style.setProperty("--ui-context-menu-item-pad-y", "6px"), this._portalEl.style.setProperty("--ui-context-menu-item-pad-x", "8px"), this._portalEl.style.setProperty("--ui-context-menu-item-font-size", "13px"), this._portalEl.style.setProperty("--ui-context-menu-item-line-height", "18px"), this._portalEl.style.setProperty("--ui-context-menu-separator-margin", "4px 8px")) : t === "lg" ? (this._portalEl.style.setProperty("--ui-context-menu-padding", "8px"), this._portalEl.style.setProperty("--ui-context-menu-item-gap", "12px"), this._portalEl.style.setProperty("--ui-context-menu-item-min-height", "40px"), this._portalEl.style.setProperty("--ui-context-menu-item-pad-y", "9px"), this._portalEl.style.setProperty("--ui-context-menu-item-pad-x", "12px"), this._portalEl.style.setProperty("--ui-context-menu-item-font-size", "15px"), this._portalEl.style.setProperty("--ui-context-menu-item-line-height", "22px"), this._portalEl.style.setProperty("--ui-context-menu-separator-margin", "8px 12px")) : (this._portalEl.style.removeProperty("--ui-context-menu-padding"), this._portalEl.style.removeProperty("--ui-context-menu-item-gap"), this._portalEl.style.removeProperty("--ui-context-menu-item-min-height"), this._portalEl.style.removeProperty("--ui-context-menu-item-pad-y"), this._portalEl.style.removeProperty("--ui-context-menu-item-pad-x"), this._portalEl.style.removeProperty("--ui-context-menu-item-font-size"), this._portalEl.style.removeProperty("--ui-context-menu-item-line-height"), this._portalEl.style.removeProperty("--ui-context-menu-separator-margin")), e ? (this._portalEl.style.setProperty("--ui-context-menu-radius", e), this._portalEl.style.setProperty("--ui-context-menu-item-radius", e), this._portalEl.style.setProperty("--ui-context-menu-submenu-radius", e)) : (this._portalEl.style.removeProperty("--ui-context-menu-radius"), this._portalEl.style.removeProperty("--ui-context-menu-item-radius"), this._portalEl.style.removeProperty("--ui-context-menu-submenu-radius")), this.state !== "idle" ? this._portalEl.setAttribute("data-state", this.state) : this._portalEl.removeAttribute("data-state");
744
- const m = this._portalEl.querySelector(".state-row");
745
- m && (m.textContent = this._stateText());
722
+ const i = this.getAttribute("variant"), n = _(this.getAttribute("size") || this.getAttribute("density")), s = this.getAttribute("density"), r = this.getAttribute("radius"), u = this.getAttribute("shape"), a = this.getAttribute("elevation"), h = this.getAttribute("tone"), m = this.getAttribute("placement");
723
+ i ? this._portalEl.setAttribute("data-variant", i) : this._portalEl.removeAttribute("data-variant"), n && n !== "md" ? this._portalEl.setAttribute("data-size", n) : this._portalEl.removeAttribute("data-size"), s ? this._portalEl.setAttribute("data-density", s) : this._portalEl.removeAttribute("data-density"), r ? this._portalEl.setAttribute("data-radius", r) : this._portalEl.removeAttribute("data-radius"), u ? this._portalEl.setAttribute("data-shape", u) : this._portalEl.removeAttribute("data-shape"), a ? this._portalEl.setAttribute("data-elevation", a) : this._portalEl.removeAttribute("data-elevation"), h ? this._portalEl.setAttribute("data-tone", h) : this._portalEl.removeAttribute("data-tone"), m ? this._portalEl.setAttribute("data-placement-request", m) : this._portalEl.removeAttribute("data-placement-request"), t === "sm" ? (this._portalEl.style.setProperty("--ui-context-menu-padding", "4px"), this._portalEl.style.setProperty("--ui-context-menu-item-gap", "8px"), this._portalEl.style.setProperty("--ui-context-menu-item-min-height", "32px"), this._portalEl.style.setProperty("--ui-context-menu-item-pad-y", "6px"), this._portalEl.style.setProperty("--ui-context-menu-item-pad-x", "8px"), this._portalEl.style.setProperty("--ui-context-menu-item-font-size", "13px"), this._portalEl.style.setProperty("--ui-context-menu-item-line-height", "18px"), this._portalEl.style.setProperty("--ui-context-menu-separator-margin", "4px 8px")) : t === "lg" ? (this._portalEl.style.setProperty("--ui-context-menu-padding", "8px"), this._portalEl.style.setProperty("--ui-context-menu-item-gap", "12px"), this._portalEl.style.setProperty("--ui-context-menu-item-min-height", "40px"), this._portalEl.style.setProperty("--ui-context-menu-item-pad-y", "9px"), this._portalEl.style.setProperty("--ui-context-menu-item-pad-x", "12px"), this._portalEl.style.setProperty("--ui-context-menu-item-font-size", "15px"), this._portalEl.style.setProperty("--ui-context-menu-item-line-height", "22px"), this._portalEl.style.setProperty("--ui-context-menu-separator-margin", "8px 12px")) : (this._portalEl.style.removeProperty("--ui-context-menu-padding"), this._portalEl.style.removeProperty("--ui-context-menu-item-gap"), this._portalEl.style.removeProperty("--ui-context-menu-item-min-height"), this._portalEl.style.removeProperty("--ui-context-menu-item-pad-y"), this._portalEl.style.removeProperty("--ui-context-menu-item-pad-x"), this._portalEl.style.removeProperty("--ui-context-menu-item-font-size"), this._portalEl.style.removeProperty("--ui-context-menu-item-line-height"), this._portalEl.style.removeProperty("--ui-context-menu-separator-margin")), e ? (this._portalEl.style.setProperty("--ui-context-menu-radius", e), this._portalEl.style.setProperty("--ui-context-menu-item-radius", e), this._portalEl.style.setProperty("--ui-context-menu-submenu-radius", e)) : (this._portalEl.style.removeProperty("--ui-context-menu-radius"), this._portalEl.style.removeProperty("--ui-context-menu-item-radius"), this._portalEl.style.removeProperty("--ui-context-menu-submenu-radius")), this.state !== "idle" ? this._portalEl.setAttribute("data-state", this.state) : this._portalEl.removeAttribute("data-state");
724
+ const p = this._portalEl.querySelector(".state-row");
725
+ p && (p.textContent = this._stateText());
746
726
  }
747
727
  _moveContentIntoPortal() {
748
728
  if (this._contentSourceEl)
@@ -761,7 +741,7 @@ class Y extends A {
761
741
  var i, n;
762
742
  if ((i = this._portalEl) != null && i.isConnected)
763
743
  return;
764
- const t = S();
744
+ const t = A();
765
745
  if (!t)
766
746
  return;
767
747
  const e = document.createElement("div");
@@ -769,13 +749,13 @@ class Y extends A {
769
749
  <style>${D}</style>
770
750
  <div class="surface" part="menu" role="menu" aria-hidden="true" aria-busy="false" tabindex="-1">
771
751
  <div class="state-row" part="state"></div>
772
- <ui-listbox class="content-host" slot="menu" role="menu" item-selector="${p.replace(/"/g, "&quot;")}" direct-item-selector="${b.replace(/"/g, "&quot;")}" item-role="menuitem" active-attribute="data-active"></ui-listbox>
752
+ <ui-listbox class="content-host" slot="menu" role="menu" item-selector="${c.replace(/"/g, "&quot;")}" direct-item-selector="${b.replace(/"/g, "&quot;")}" item-role="menuitem" active-attribute="data-active"></ui-listbox>
773
753
  </div>
774
754
  `, t.appendChild(e), this._portalEl = e, this._portalSurfaceEl = e.querySelector(".surface"), this._portalContentHostEl = e.querySelector("ui-listbox.content-host"), this._moveContentIntoPortal(), (n = this._portalContentHostEl) == null || n.refresh(), this._syncPortalVisualState(), this._syncSurfaceState(), this._bindPortalInteractionListeners(), this._syncDismissableLayer();
775
755
  }
776
756
  _teardownPortal() {
777
- var t, e;
778
- if ((t = this._dismissableLayer) == null || t.destroy(), this._dismissableLayer = null, this._unbindPortalInteractionListeners(), this._restoreContentFromPortal(), this._portalContentHostEl = null, this._portalSurfaceEl = null, (e = this._portalEl) != null && e.parentElement)
757
+ var t, e, i;
758
+ if ((t = this._dismissableLayer) == null || t.destroy(), this._dismissableLayer = null, (e = this._positioner) == null || e.destroy(), this._positioner = null, this._positionerPlacement = null, this._positionerOffset = 0, this._positionerAnchorEl = null, this._unbindPortalInteractionListeners(), this._restoreContentFromPortal(), this._portalContentHostEl = null, this._portalSurfaceEl = null, (i = this._portalEl) != null && i.parentElement)
779
759
  try {
780
760
  this._portalEl.parentElement.removeChild(this._portalEl);
781
761
  } catch {
@@ -789,15 +769,15 @@ class Y extends A {
789
769
  (e = this._dismissableLayer) == null || e.destroy(), this._dismissableLayer = null;
790
770
  return;
791
771
  }
792
- (i = this._dismissableLayer) == null || i.destroy(), this._dismissableLayer = w({
772
+ (i = this._dismissableLayer) == null || i.destroy(), this._dismissableLayer = S({
793
773
  node: t,
794
774
  trigger: this._anchorEl || this,
795
775
  closeOnEscape: this.closeOnEscape,
796
776
  closeOnPointerOutside: !0,
797
777
  closeOnFocusOutside: !0,
798
778
  onDismiss: (n) => {
799
- const o = n === "escape-key" ? "escape" : "outside";
800
- this._setOpen(!1, o);
779
+ const s = n === "escape-key" ? "escape" : "outside";
780
+ this._setOpen(!1, s);
801
781
  }
802
782
  });
803
783
  }
@@ -817,6 +797,48 @@ class Y extends A {
817
797
  height: t.height
818
798
  };
819
799
  }
800
+ _pointVirtualAnchor() {
801
+ return {
802
+ getBoundingClientRect: () => {
803
+ const { x: t, y: e } = this._point;
804
+ return {
805
+ x: t,
806
+ y: e,
807
+ top: e,
808
+ left: t,
809
+ right: t,
810
+ bottom: e,
811
+ width: 0,
812
+ height: 0,
813
+ toJSON: () => ({})
814
+ };
815
+ }
816
+ };
817
+ }
818
+ _rebuildPositioner(t, e, i) {
819
+ var n;
820
+ (n = this._positioner) == null || n.destroy(), this._positioner = P({
821
+ anchor: this._anchorEl || this._pointVirtualAnchor(),
822
+ floating: t,
823
+ placement: e,
824
+ strategy: "fixed",
825
+ offset: i,
826
+ flip: !0,
827
+ shift: !0,
828
+ boundaryPadding: l,
829
+ observeWindowResize: !1,
830
+ observeScroll: !1,
831
+ observeAncestorScroll: !1,
832
+ observeAncestorResize: !1,
833
+ observeLayoutShift: !1,
834
+ observeAnchorResize: !1,
835
+ observeFloatingResize: !1,
836
+ onUpdate: (s) => {
837
+ const r = window.innerWidth || document.documentElement.clientWidth || 0, u = window.innerHeight || document.documentElement.clientHeight || 0;
838
+ t.style.maxWidth = `${Math.max(160, r - l * 2)}px`, t.style.maxHeight = `${Math.max(120, u - l * 2)}px`, t.setAttribute("data-placement", s.placement.split("-")[0]);
839
+ }
840
+ }), this._positionerPlacement = e, this._positionerOffset = i, this._positionerAnchorEl = this._anchorEl;
841
+ }
820
842
  _startAnchorTracking() {
821
843
  !this._isOpen || !this._anchorEl || this._anchorTrackRaf != null || (this._lastAnchorRect = this._captureAnchorRect(), this._anchorTrackRaf = requestAnimationFrame(this._trackAnchorLayout));
822
844
  }
@@ -844,10 +866,10 @@ class Y extends A {
844
866
  _queryMenuItems(t) {
845
867
  var i;
846
868
  const e = t || this._menuHost();
847
- return e ? (((i = this._listbox()) == null ? void 0 : i.queryItems({ container: e })) || []).filter((n) => V(n)) : [];
869
+ return e ? (((i = this._listbox()) == null ? void 0 : i.queryItems({ container: e })) || []).filter((n) => N(n)) : [];
848
870
  }
849
871
  _submenuFor(t) {
850
- return t.querySelector(L);
872
+ return t.querySelector(O);
851
873
  }
852
874
  _clearHighlights() {
853
875
  this._hoveredItem = null;
@@ -904,38 +926,38 @@ class Y extends A {
904
926
  }
905
927
  const e = document.activeElement;
906
928
  if (e instanceof HTMLElement) {
907
- const n = e.closest(p);
929
+ const n = e.closest(c);
908
930
  if (n instanceof HTMLElement)
909
931
  return n;
910
932
  }
911
933
  return (i = this._hoveredItem) != null && i.isConnected ? this._hoveredItem : null;
912
934
  }
913
935
  _moveFocus(t, e) {
914
- var o, r, a;
936
+ var s, r, u;
915
937
  const i = t.closest(".submenu") || this._menuHost();
916
938
  if (!i)
917
939
  return;
918
940
  if (e === "first") {
919
- const c = (o = this._listbox()) == null ? void 0 : o.focusBoundary("first", {
941
+ const a = (s = this._listbox()) == null ? void 0 : s.focusBoundary("first", {
920
942
  container: i,
921
943
  focus: !0,
922
944
  owner: this._surface(),
923
945
  scroll: !0
924
946
  });
925
- c && this._setOpenBranch(c, !1);
947
+ a && this._setOpenBranch(a, !1);
926
948
  return;
927
949
  }
928
950
  if (e === "last") {
929
- const c = (r = this._listbox()) == null ? void 0 : r.focusBoundary("last", {
951
+ const a = (r = this._listbox()) == null ? void 0 : r.focusBoundary("last", {
930
952
  container: i,
931
953
  focus: !0,
932
954
  owner: this._surface(),
933
955
  scroll: !0
934
956
  });
935
- c && this._setOpenBranch(c, !1);
957
+ a && this._setOpenBranch(a, !1);
936
958
  return;
937
959
  }
938
- const n = (a = this._listbox()) == null ? void 0 : a.move(e === "next" ? 1 : -1, {
960
+ const n = (u = this._listbox()) == null ? void 0 : u.move(e === "next" ? 1 : -1, {
939
961
  container: i,
940
962
  current: t,
941
963
  focus: !0,
@@ -949,27 +971,27 @@ class Y extends A {
949
971
  if (!i || (i.querySelectorAll('[data-submenu-open="true"]').forEach((r) => r.removeAttribute("data-submenu-open")), !t))
950
972
  return;
951
973
  const n = [];
952
- let o = t;
953
- for (; o; ) {
954
- const r = o.closest(".submenu");
974
+ let s = t;
975
+ for (; s; ) {
976
+ const r = s.closest(".submenu");
955
977
  if (!r)
956
978
  break;
957
- const a = r.parentElement;
958
- if (!(a instanceof HTMLElement) || !a.matches(p))
979
+ const u = r.parentElement;
980
+ if (!(u instanceof HTMLElement) || !u.matches(c))
959
981
  break;
960
- n.unshift(a), o = a;
982
+ n.unshift(u), s = u;
961
983
  }
962
984
  n.forEach((r) => r.setAttribute("data-submenu-open", "true")), e && this._submenuFor(t) && t.setAttribute("data-submenu-open", "true");
963
985
  }
964
986
  _openSubmenu(t, e) {
965
- var o;
987
+ var s;
966
988
  this._cancelSubmenuIntent();
967
989
  const i = this._submenuFor(t);
968
990
  if (!i || x(t))
969
991
  return !1;
970
992
  if (this._setOpenBranch(t, !0), this._scheduleSubmenuLayout(), !e)
971
993
  return !0;
972
- const n = (o = this._listbox()) == null ? void 0 : o.focusBoundary("first", {
994
+ const n = (s = this._listbox()) == null ? void 0 : s.focusBoundary("first", {
973
995
  container: i,
974
996
  focus: !0,
975
997
  owner: this._surface(),
@@ -982,7 +1004,7 @@ class Y extends A {
982
1004
  if (!e)
983
1005
  return !1;
984
1006
  const i = e.parentElement;
985
- return !(i instanceof HTMLElement) || !i.matches(p) ? !1 : (this._focusItem(i), this._setOpenBranch(i, !1), i.removeAttribute("data-submenu-open"), !0);
1007
+ return !(i instanceof HTMLElement) || !i.matches(c) ? !1 : (this._focusItem(i), this._setOpenBranch(i, !1), i.removeAttribute("data-submenu-open"), !0);
986
1008
  }
987
1009
  _clearSubmenuState() {
988
1010
  var e;
@@ -991,14 +1013,14 @@ class Y extends A {
991
1013
  t && (t.querySelectorAll('[data-submenu-open="true"]').forEach((i) => i.removeAttribute("data-submenu-open")), (e = this._listbox()) == null || e.clearActive({ container: t }));
992
1014
  }
993
1015
  _handleTypeahead(t, e) {
994
- var o;
1016
+ var s;
995
1017
  if (!this.typeahead || t.ctrlKey || t.altKey || t.metaKey || t.key.length !== 1 || !/\S/.test(t.key))
996
1018
  return !1;
997
1019
  const i = (e == null ? void 0 : e.closest(".submenu")) || this._menuHost();
998
1020
  if (!i)
999
1021
  return !1;
1000
- this._typeaheadBuffer = `${this._typeaheadBuffer}${t.key}`.slice(-24), this._typeaheadTimer != null && window.clearTimeout(this._typeaheadTimer), this._typeaheadTimer = window.setTimeout(() => this._resetTypeahead(), C);
1001
- const n = (o = this._listbox()) == null ? void 0 : o.typeahead(this._typeaheadBuffer, {
1022
+ this._typeaheadBuffer = `${this._typeaheadBuffer}${t.key}`.slice(-24), this._typeaheadTimer != null && window.clearTimeout(this._typeaheadTimer), this._typeaheadTimer = window.setTimeout(() => this._resetTypeahead(), R);
1023
+ const n = (s = this._listbox()) == null ? void 0 : s.typeahead(this._typeaheadBuffer, {
1002
1024
  container: i,
1003
1025
  current: e,
1004
1026
  focus: !0,
@@ -1010,8 +1032,8 @@ class Y extends A {
1010
1032
  _applySelectionBehavior(t) {
1011
1033
  const e = t.getAttribute("role");
1012
1034
  if (e === "menuitemcheckbox") {
1013
- const o = t.getAttribute("aria-checked") !== "true";
1014
- t.setAttribute("aria-checked", o ? "true" : "false"), t.setAttribute("data-state", o ? "checked" : "unchecked");
1035
+ const s = t.getAttribute("aria-checked") !== "true";
1036
+ t.setAttribute("aria-checked", s ? "true" : "false"), t.setAttribute("data-state", s ? "checked" : "unchecked");
1015
1037
  return;
1016
1038
  }
1017
1039
  if (e !== "menuitemradio")
@@ -1020,21 +1042,21 @@ class Y extends A {
1020
1042
  if (!i)
1021
1043
  return;
1022
1044
  const n = t.getAttribute("data-group") || t.getAttribute("name") || "";
1023
- i.querySelectorAll('[role="menuitemradio"]').forEach((o) => {
1024
- const r = o.getAttribute("data-group") || o.getAttribute("name") || "";
1025
- n && r !== n || (o.setAttribute("aria-checked", "false"), o.setAttribute("data-state", "unchecked"));
1045
+ i.querySelectorAll('[role="menuitemradio"]').forEach((s) => {
1046
+ const r = s.getAttribute("data-group") || s.getAttribute("name") || "";
1047
+ n && r !== n || (s.setAttribute("aria-checked", "false"), s.setAttribute("data-state", "unchecked"));
1026
1048
  }), t.setAttribute("aria-checked", "true"), t.setAttribute("data-state", "checked");
1027
1049
  }
1028
1050
  _emitSelect(t) {
1029
- var o;
1030
- const e = this._menuHost(), n = (e ? Array.from(e.querySelectorAll(p)) : []).indexOf(t);
1051
+ var s;
1052
+ const e = this._menuHost(), n = (e ? Array.from(e.querySelectorAll(c)) : []).indexOf(t);
1031
1053
  this.dispatchEvent(new CustomEvent("select", {
1032
1054
  bubbles: !0,
1033
1055
  composed: !0,
1034
1056
  detail: {
1035
1057
  index: n,
1036
1058
  value: t.getAttribute("data-value") || t.getAttribute("value") || void 0,
1037
- label: t.getAttribute("aria-label") || ((o = t.textContent) == null ? void 0 : o.trim()) || void 0,
1059
+ label: t.getAttribute("aria-label") || ((s = t.textContent) == null ? void 0 : s.trim()) || void 0,
1038
1060
  checked: t.getAttribute("aria-checked") === "true",
1039
1061
  item: t
1040
1062
  }
@@ -1046,15 +1068,20 @@ class Y extends A {
1046
1068
  }));
1047
1069
  }
1048
1070
  _positionMenu() {
1071
+ var r;
1049
1072
  const t = this._surface();
1050
1073
  if (!t)
1051
1074
  return;
1052
- if (this._anchorEl && !N(this._anchorEl)) {
1075
+ if (this._anchorEl && !W(this._anchorEl)) {
1053
1076
  this.close();
1054
1077
  return;
1055
1078
  }
1056
- const e = this._anchorEl ? this._anchorEl.getBoundingClientRect() : W(this._point), i = t.getBoundingClientRect(), n = i.width || t.offsetWidth || 240, o = i.height || t.offsetHeight || 0, r = $(this.getAttribute("placement")), a = U(e, n, o, r, this._anchorEl ? O : 0);
1057
- t.style.left = `${a.x}px`, t.style.top = `${a.y}px`, t.style.maxWidth = `${a.maxWidth}px`, t.style.maxHeight = `${a.maxHeight}px`, t.setAttribute("data-placement", a.placement);
1079
+ const e = $(this.getAttribute("placement")), i = V(e), n = this._anchorEl ? L : 0;
1080
+ if (!this._positioner || this._positionerPlacement !== i || this._positionerOffset !== n || this._positionerAnchorEl !== this._anchorEl) {
1081
+ this._rebuildPositioner(t, i, n);
1082
+ return;
1083
+ }
1084
+ (r = this._positioner) == null || r.update();
1058
1085
  }
1059
1086
  _scheduleSubmenuLayout() {
1060
1087
  this._isOpen && (this._submenuRaf != null && cancelAnimationFrame(this._submenuRaf), this._submenuRaf = requestAnimationFrame(() => {
@@ -1066,15 +1093,15 @@ class Y extends A {
1066
1093
  if (!t)
1067
1094
  return;
1068
1095
  const e = window.innerWidth || document.documentElement.clientWidth || 0, i = window.innerHeight || document.documentElement.clientHeight || 0;
1069
- Array.from(t.querySelectorAll('.menuitem > .submenu, [role="menuitem"] > .submenu')).forEach((o) => {
1070
- const r = o.parentElement;
1096
+ Array.from(t.querySelectorAll('.menuitem > .submenu, [role="menuitem"] > .submenu')).forEach((s) => {
1097
+ const r = s.parentElement;
1071
1098
  if (!(r instanceof HTMLElement))
1072
1099
  return;
1073
1100
  r.removeAttribute("data-submenu-side"), r.removeAttribute("data-submenu-align");
1074
- const a = o.style.display, c = o.style.visibility, l = o.style.pointerEvents, h = o.style.opacity, m = o.style.transform;
1075
- o.style.display = "grid", o.style.visibility = "hidden", o.style.pointerEvents = "none", o.style.opacity = "0", o.style.transform = "none";
1076
- const d = r.getBoundingClientRect(), f = o.getBoundingClientRect();
1077
- d.right + u + f.width > e && d.left - u - f.width >= u && r.setAttribute("data-submenu-side", "left"), d.top + f.height > i - u && d.bottom - f.height >= u && r.setAttribute("data-submenu-align", "up"), o.style.display = a, o.style.visibility = c, o.style.pointerEvents = l, o.style.opacity = h, o.style.transform = m;
1101
+ const u = s.style.display, a = s.style.visibility, h = s.style.pointerEvents, m = s.style.opacity, p = s.style.transform;
1102
+ s.style.display = "grid", s.style.visibility = "hidden", s.style.pointerEvents = "none", s.style.opacity = "0", s.style.transform = "none";
1103
+ const d = r.getBoundingClientRect(), f = s.getBoundingClientRect();
1104
+ d.right + l + f.width > e && d.left - l - f.width >= l && r.setAttribute("data-submenu-side", "left"), d.top + f.height > i - l && d.bottom - f.height >= l && r.setAttribute("data-submenu-align", "up"), s.style.display = u, s.style.visibility = a, s.style.pointerEvents = h, s.style.opacity = m, s.style.transform = p;
1078
1105
  });
1079
1106
  }
1080
1107
  _onRootClick(t) {
@@ -1128,7 +1155,7 @@ class Y extends A {
1128
1155
  this._submenuIntentTimer = null;
1129
1156
  const e = this._submenuIntentItem;
1130
1157
  this._submenuIntentItem = null, !(!e || !e.isConnected || !this._isOpen) && (this._setOpenBranch(e, !0), this._scheduleSubmenuLayout());
1131
- }, I));
1158
+ }, C));
1132
1159
  }
1133
1160
  _onRootKeyDown(t) {
1134
1161
  if (!this._isOpen)
@@ -1183,10 +1210,10 @@ class Y extends A {
1183
1210
  render() {
1184
1211
  const t = M(this._stateText());
1185
1212
  this.setContent(`
1186
- <style>${v}</style>
1213
+ <style>${g}</style>
1187
1214
  <div class="surface" part="menu" role="menu" aria-hidden="true" aria-busy="false" tabindex="-1">
1188
1215
  <div class="state-row" part="state" data-state="${this.state}">${t}</div>
1189
- <ui-listbox class="content-host" part="content" slot="menu" role="menu" item-selector="${p.replace(/"/g, "&quot;")}" direct-item-selector="${b.replace(/"/g, "&quot;")}" item-role="menuitem" active-attribute="data-active">
1216
+ <ui-listbox class="content-host" part="content" slot="menu" role="menu" item-selector="${c.replace(/"/g, "&quot;")}" direct-item-selector="${b.replace(/"/g, "&quot;")}" item-role="menuitem" active-attribute="data-active">
1190
1217
  <slot name="menu"></slot>
1191
1218
  <slot name="content"></slot>
1192
1219
  </ui-listbox>
@@ -1198,7 +1225,7 @@ class Y extends A {
1198
1225
  return !1;
1199
1226
  }
1200
1227
  }
1201
- typeof customElements < "u" && !customElements.get("ui-context-menu") && customElements.define("ui-context-menu", Y);
1228
+ typeof customElements < "u" && !customElements.get("ui-context-menu") && customElements.define("ui-context-menu", U);
1202
1229
  export {
1203
- Y as UIContextMenu
1230
+ U as UIContextMenu
1204
1231
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("./ElementBase-1b301e7f.js"),U=require("./calendar-a8735e40.js"),d=require("./date-time-utils-378ecc21.js");require("./scroll-lock-d7b0df21.js");let F=0;const I=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("./ElementBase-1b301e7f.js"),U=require("./calendar-a8735e40.js"),d=require("./date-time-utils-66480de4.js");require("./scroll-lock-d7b0df21.js");require("./positioner-33529bb8.js");let F=0;const I=`
2
2
  :host {
3
3
  --ui-date-field-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent);
4
4
  --ui-date-field-border: 1px solid var(--ui-date-field-border-color);
@@ -1,7 +1,8 @@
1
1
  import { E as F } from "./ElementBase-909688f3.mjs";
2
2
  import { p as U } from "./calendar-2c11b824.mjs";
3
- import { n as h, a as I, b as E } from "./date-time-utils-a8b17ea7.mjs";
3
+ import { n as h, a as I, b as E } from "./date-time-utils-a2c7af25.mjs";
4
4
  import "./scroll-lock-31da444f.mjs";
5
+ import "./positioner-e9770c66.mjs";
5
6
  let T = 0;
6
7
  const w = `
7
8
  :host {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("./ElementBase-1b301e7f.js"),L=require("./dismissable-layer-193e3bed.js"),w=require("./calendar-a8735e40.js"),a=require("./date-time-utils-378ecc21.js");require("./scroll-lock-d7b0df21.js");let q=0;const M=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("./ElementBase-1b301e7f.js"),L=require("./dismissable-layer-193e3bed.js"),w=require("./calendar-a8735e40.js"),a=require("./date-time-utils-66480de4.js");require("./scroll-lock-d7b0df21.js");require("./positioner-33529bb8.js");let q=0;const M=`
2
2
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
3
3
  <path d="M6 2a1 1 0 0 1 1 1v1h6V3a1 1 0 1 1 2 0v1h.5A2.5 2.5 0 0 1 18 6.5v9A2.5 2.5 0 0 1 15.5 18h-11A2.5 2.5 0 0 1 2 15.5v-9A2.5 2.5 0 0 1 4.5 4H5V3a1 1 0 0 1 1-1Zm10 7H4v6.5c0 .276.224.5.5.5h11a.5.5 0 0 0 .5-.5V9ZM4.5 6a.5.5 0 0 0-.5.5V7h12v-.5a.5.5 0 0 0-.5-.5h-11Z" fill="currentColor"/>
4
4
  </svg>
@@ -1,8 +1,9 @@
1
1
  import { E as q } from "./ElementBase-909688f3.mjs";
2
2
  import { c as M } from "./dismissable-layer-9c7e6b58.mjs";
3
3
  import { r as E, c as S } from "./calendar-2c11b824.mjs";
4
- import { r as $, e as R, n as g, i as y, s as F, b as T, p as L, a as O, f as H, l as V, c as U, d as Y } from "./date-time-utils-a8b17ea7.mjs";
4
+ import { r as $, e as R, n as g, i as y, s as F, b as T, p as L, a as O, f as H, l as V, c as U, d as Y } from "./date-time-utils-a2c7af25.mjs";
5
5
  import "./scroll-lock-31da444f.mjs";
6
+ import "./positioner-e9770c66.mjs";
6
7
  let K = 0;
7
8
  const W = `
8
9
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">