@sbb-esta/lyne-elements 1.7.0 → 1.8.0

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 (88) hide show
  1. package/calendar/calendar.d.ts +5 -2
  2. package/calendar/calendar.d.ts.map +1 -1
  3. package/calendar.js +73 -66
  4. package/container/container.js +5 -5
  5. package/core/base-elements/open-close-base-element.d.ts +10 -0
  6. package/core/base-elements/open-close-base-element.d.ts.map +1 -1
  7. package/core/base-elements.js +4 -0
  8. package/core/controllers/inert-controller.d.ts +18 -0
  9. package/core/controllers/inert-controller.d.ts.map +1 -0
  10. package/core/controllers.d.ts +1 -0
  11. package/core/controllers.d.ts.map +1 -1
  12. package/core/controllers.js +67 -23
  13. package/core/overlay/overlay.d.ts +0 -13
  14. package/core/overlay/overlay.d.ts.map +1 -1
  15. package/core/overlay.js +36 -86
  16. package/custom-elements.json +369 -65
  17. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +4 -0
  18. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  19. package/datepicker/datepicker-toggle.js +51 -41
  20. package/development/calendar/calendar.d.ts +5 -2
  21. package/development/calendar/calendar.d.ts.map +1 -1
  22. package/development/calendar.js +35 -19
  23. package/development/container/container.js +8 -4
  24. package/development/core/base-elements/open-close-base-element.d.ts +10 -0
  25. package/development/core/base-elements/open-close-base-element.d.ts.map +1 -1
  26. package/development/core/base-elements.js +5 -1
  27. package/development/core/controllers/inert-controller.d.ts +18 -0
  28. package/development/core/controllers/inert-controller.d.ts.map +1 -0
  29. package/development/core/controllers.d.ts +1 -0
  30. package/development/core/controllers.d.ts.map +1 -1
  31. package/development/core/controllers.js +90 -1
  32. package/development/core/overlay/overlay.d.ts +0 -13
  33. package/development/core/overlay/overlay.d.ts.map +1 -1
  34. package/development/core/overlay.js +1 -87
  35. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +4 -0
  36. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  37. package/development/datepicker/datepicker-toggle.js +17 -2
  38. package/development/dialog/dialog/dialog.d.ts.map +1 -1
  39. package/development/dialog/dialog.js +3 -4
  40. package/development/flip-card/flip-card/flip-card.d.ts.map +1 -1
  41. package/development/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
  42. package/development/flip-card/flip-card-details.js +28 -9
  43. package/development/flip-card/flip-card-summary.js +6 -1
  44. package/development/flip-card/flip-card.js +43 -12
  45. package/development/form-field/form-field.js +4 -2
  46. package/development/lead-container.js +5 -1
  47. package/development/menu/menu/menu.d.ts +1 -0
  48. package/development/menu/menu/menu.d.ts.map +1 -1
  49. package/development/menu/menu.js +6 -9
  50. package/development/navigation/navigation/navigation.d.ts +1 -0
  51. package/development/navigation/navigation/navigation.d.ts.map +1 -1
  52. package/development/navigation/navigation.js +6 -9
  53. package/development/overlay/overlay-base-element.d.ts +2 -1
  54. package/development/overlay/overlay-base-element.d.ts.map +1 -1
  55. package/development/overlay/overlay.d.ts.map +1 -1
  56. package/development/overlay.js +5 -9
  57. package/development/popover/popover.js +2 -2
  58. package/development/toggle/toggle/toggle.d.ts +2 -1
  59. package/development/toggle/toggle/toggle.d.ts.map +1 -1
  60. package/development/toggle/toggle-option/toggle-option.d.ts.map +1 -1
  61. package/development/toggle/toggle-option.js +3 -2
  62. package/development/toggle/toggle.js +7 -7
  63. package/dialog/dialog/dialog.d.ts.map +1 -1
  64. package/dialog/dialog.js +11 -12
  65. package/flip-card/flip-card/flip-card.d.ts.map +1 -1
  66. package/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
  67. package/flip-card/flip-card-details.js +19 -17
  68. package/flip-card/flip-card-summary.js +13 -13
  69. package/flip-card/flip-card.js +26 -24
  70. package/form-field/form-field.js +1 -1
  71. package/lead-container.js +1 -1
  72. package/menu/menu/menu.d.ts +1 -0
  73. package/menu/menu/menu.d.ts.map +1 -1
  74. package/menu/menu.js +30 -30
  75. package/navigation/navigation/navigation.d.ts +1 -0
  76. package/navigation/navigation/navigation.d.ts.map +1 -1
  77. package/navigation/navigation.js +37 -37
  78. package/overlay/overlay-base-element.d.ts +2 -1
  79. package/overlay/overlay-base-element.d.ts.map +1 -1
  80. package/overlay/overlay.d.ts.map +1 -1
  81. package/overlay.js +44 -45
  82. package/package.json +1 -1
  83. package/popover/popover.js +1 -1
  84. package/toggle/toggle/toggle.d.ts +2 -1
  85. package/toggle/toggle/toggle.d.ts.map +1 -1
  86. package/toggle/toggle-option/toggle-option.d.ts.map +1 -1
  87. package/toggle/toggle-option.js +8 -8
  88. package/toggle/toggle.js +20 -21
@@ -1,7 +1,7 @@
1
- import { isServer as d } from "lit";
1
+ import { isServer as c } from "lit";
2
2
  import { readConfig as u } from "./config.js";
3
3
  import { AgnosticMutationObserver as _ } from "./observers.js";
4
- class b {
4
+ class C {
5
5
  constructor(t) {
6
6
  this._host = t, this._abortController = new AbortController(), this._host.addController(this);
7
7
  }
@@ -17,14 +17,57 @@ class b {
17
17
  (t = this._abortController) == null || t.abort(), this._abortController = void 0;
18
18
  }
19
19
  }
20
+ const b = ["script", "head", "template", "style"], f = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
21
+ class E {
22
+ constructor(t, i = f, r = g) {
23
+ var s, o;
24
+ this._host = t, this._inertElements = i, this._inertOverlays = r, (o = (s = this._host).addController) == null || o.call(s, this);
25
+ }
26
+ hostConnected() {
27
+ this._host.isOpen && this.activate();
28
+ }
29
+ hostDisconnected() {
30
+ this._inertOverlays.has(this._host) && this.deactivate();
31
+ }
32
+ /** Applies inert state to every other element on the page except the overlay. */
33
+ activate() {
34
+ this._inertOverlays.size && this._removeInertAttributes(), this._inertOverlays.add(this._host), this._addInertAttributes();
35
+ }
36
+ /** Removes inert state. */
37
+ deactivate() {
38
+ if (this._currentOverlay() !== this._host) {
39
+ this._inertOverlays.has(this._host) && this._inertOverlays.delete(this._host);
40
+ return;
41
+ }
42
+ this._removeInertAttributes(), this._inertOverlays.delete(this._host), this._inertOverlays.size && this._addInertAttributes();
43
+ }
44
+ _currentOverlay() {
45
+ return [...this._inertOverlays].pop() ?? null;
46
+ }
47
+ _removeInertAttributes() {
48
+ this._inertElements.forEach((t) => {
49
+ t && (t.hasAttribute("data-sbb-inert") && (t.inert = !1, t.removeAttribute("data-sbb-inert")), t.hasAttribute("data-sbb-aria-hidden") && (t.removeAttribute("aria-hidden"), t.removeAttribute("data-sbb-aria-hidden")));
50
+ }), this._inertElements.clear();
51
+ }
52
+ _addInertAttributes() {
53
+ var i, r;
54
+ let t = this._currentOverlay();
55
+ for (; t !== document.documentElement && t !== null; )
56
+ Array.from(((i = (t == null ? void 0 : t.parentElement) ?? (t == null ? void 0 : t.getRootNode())) == null ? void 0 : i.childNodes) ?? []).filter(
57
+ (s) => s !== t && s instanceof window.HTMLElement && !b.includes(s.localName)
58
+ ).forEach((s) => {
59
+ this._inertElements.add(s), s.inert || (s.inert = !0, s.toggleAttribute("data-sbb-inert", !0)), s.hasAttribute("aria-hidden") || (s.setAttribute("aria-hidden", "true"), s.toggleAttribute("data-sbb-aria-hidden", !0));
60
+ }), t = (t == null ? void 0 : t.parentElement) ?? ((r = t == null ? void 0 : t.getRootNode()) == null ? void 0 : r.host) ?? null;
61
+ }
62
+ }
20
63
  const e = class e {
21
64
  constructor(t) {
22
65
  this._host = t, this._handlers = [], this._host.addController(this);
23
66
  }
24
67
  /** Get the current language. */
25
68
  static get current() {
26
- const s = ((u().language ?? (d ? e._defaultLanguage : document.documentElement.getAttribute("lang"))) || e._defaultLanguage).split("-")[0];
27
- return e._supportedLocales.includes(s) ? s : e._defaultLanguage;
69
+ const i = ((u().language ?? (c ? e._defaultLanguage : document.documentElement.getAttribute("lang"))) || e._defaultLanguage).split("-")[0];
70
+ return e._supportedLocales.includes(i) ? i : e._defaultLanguage;
28
71
  }
29
72
  /** Get the current language. */
30
73
  get current() {
@@ -44,20 +87,20 @@ const e = class e {
44
87
  this._previousLanguage = this.current, e._listeners.delete(this), e._listeners.size || e._observer.disconnect();
45
88
  }
46
89
  _callHandlers(t = !0) {
47
- this._handlers.forEach((s) => s()), t && this._host.requestUpdate();
90
+ this._handlers.forEach((i) => i()), t && this._host.requestUpdate();
48
91
  }
49
92
  };
50
93
  e._defaultLanguage = "en", e._supportedLocales = ["en", "de", "fr", "it"], e._listeners = /* @__PURE__ */ new Set(), e._observer = new _((t) => {
51
- t[0].oldValue !== document.documentElement.getAttribute("lang") && e._listeners.forEach((s) => s._callHandlers());
94
+ t[0].oldValue !== document.documentElement.getAttribute("lang") && e._listeners.forEach((i) => i._callHandlers());
52
95
  }), e._observerConfig = {
53
96
  attributeFilter: ["lang"],
54
97
  attributeOldValue: !0
55
98
  };
56
- let h = e;
57
- class C {
58
- constructor(t, s = null) {
59
- this._host = t, this._onChangeCallback = s, this.slots = /* @__PURE__ */ new Set(), this._slotchangeHandler = (o) => {
60
- this._syncSlots(o.target);
99
+ let d = e;
100
+ class p {
101
+ constructor(t, i = null) {
102
+ this._host = t, this._onChangeCallback = i, this.slots = /* @__PURE__ */ new Set(), this._slotchangeHandler = (r) => {
103
+ this._syncSlots(r.target);
61
104
  }, this._host.addController(this);
62
105
  }
63
106
  hostConnected() {
@@ -69,20 +112,21 @@ class C {
69
112
  (t = this._host.shadowRoot) == null || t.removeEventListener("slotchange", this._slotchangeHandler);
70
113
  }
71
114
  _syncSlots(...t) {
72
- var n;
73
- for (const r of t) {
74
- const i = r.name || "unnamed";
75
- r.assignedNodes().some((l) => {
76
- var a;
77
- return "tagName" in l || ((a = l.textContent) == null ? void 0 : a.trim());
78
- }) ? this.slots.add(i) : this.slots.delete(i);
115
+ var s;
116
+ for (const o of t) {
117
+ const a = o.name || "unnamed";
118
+ o.assignedNodes().some((h) => {
119
+ var l;
120
+ return "tagName" in h || ((l = h.textContent) == null ? void 0 : l.trim());
121
+ }) ? this.slots.add(a) : this.slots.delete(a);
79
122
  }
80
- const s = this._host.getAttribute("data-slot-names"), o = [...this.slots].sort().join(" ");
81
- o ? this._host.getAttribute("data-slot-names") !== o && this._host.setAttribute("data-slot-names", o) : this._host.removeAttribute("data-slot-names"), o !== s && ((n = this._onChangeCallback) == null || n.call(this));
123
+ const i = this._host.getAttribute("data-slot-names"), r = [...this.slots].sort().join(" ");
124
+ r ? this._host.getAttribute("data-slot-names") !== r && this._host.setAttribute("data-slot-names", r) : this._host.removeAttribute("data-slot-names"), r !== i && ((s = this._onChangeCallback) == null || s.call(this));
82
125
  }
83
126
  }
84
127
  export {
85
- b as SbbConnectedAbortController,
86
- h as SbbLanguageController,
87
- C as SbbSlotStateController
128
+ C as SbbConnectedAbortController,
129
+ E as SbbInertController,
130
+ d as SbbLanguageController,
131
+ p as SbbSlotStateController
88
132
  };
@@ -4,17 +4,4 @@ import { TemplateResult } from 'lit';
4
4
  * Works in conjunction with the 'overlayGapFixCorners()' function in 'overlay.ts'
5
5
  */
6
6
  export declare function overlayGapFixCorners(): TemplateResult;
7
- /**
8
- * Applies inert to every other element on the page except the overlay.
9
- */
10
- export declare function applyInertMechanism(overlay: HTMLElement): void;
11
- export declare function removeInertMechanism(): void;
12
- declare global {
13
- interface GlobalEventHandlersEventMap {
14
- willOpen: CustomEvent<void>;
15
- willClose: CustomEvent<void>;
16
- didOpen: CustomEvent<void>;
17
- didClose: CustomEvent<void>;
18
- }
19
- }
20
7
  //# sourceMappingURL=overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1C;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CASrD;AA4DD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAyB9D;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAqB3C;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,2BAA2B;QACnC,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QAC5B,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QAC7B,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3B,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KAC7B;CACF"}
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/overlay/overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1C;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CASrD"}
package/core/overlay.js CHANGED
@@ -1,7 +1,6 @@
1
- import { html as E } from "lit";
2
- const x = ":is(sbb-dialog, sbb-navigation, sbb-menu, sbb-overlay)[data-state='opened']";
3
- function $() {
4
- return E`
1
+ import { html as H } from "lit";
2
+ function O() {
3
+ return H`
5
4
  <div class="sbb-gap-fix-wrapper">
6
5
  <div class="sbb-gap-fix-corner" id="left"></div>
7
6
  </div>
@@ -10,54 +9,7 @@ function $() {
10
9
  </div>
11
10
  `;
12
11
  }
13
- const O = (t, e) => {
14
- let n = t.parentElement;
15
- const i = [];
16
- for (; n && (i.push(n), n !== e); )
17
- n = n.parentElement;
18
- return i;
19
- }, w = (t) => {
20
- t.setAttribute(
21
- "data-sbb-inert",
22
- `${+(t.getAttribute("data-sbb-inert") ?? void 0) + 1 || 0}`
23
- );
24
- }, W = (t) => {
25
- t.inert || (t.inert = !0, t.matches(x) ? w(t) : t.toggleAttribute("data-sbb-inert", !0)), t.hasAttribute("aria-hidden") || (t.setAttribute("aria-hidden", "true"), t.toggleAttribute("data-sbb-aria-hidden", !0));
26
- }, y = (t) => {
27
- t.hasAttribute("data-sbb-inert") && (t.inert = !1, t.removeAttribute("data-sbb-inert")), t.hasAttribute("data-sbb-aria-hidden") && (t.removeAttribute("aria-hidden"), t.removeAttribute("data-sbb-aria-hidden"));
28
- };
29
- function C(t) {
30
- y(t);
31
- const e = t.closest("body > *");
32
- Array.from(document.querySelectorAll("body > *")).filter(
33
- (o) => o !== e
34
- ).forEach((o) => W(o));
35
- let i = [];
36
- const a = O(t, e);
37
- for (const o of a)
38
- i = i.concat(
39
- Array.from(o.children).filter(
40
- (c) => c !== t && !a.includes(c)
41
- )
42
- ), o.matches(x) && w(o);
43
- i.forEach((o) => W(o));
44
- }
45
- function z() {
46
- const t = Array.from(
47
- document.documentElement.querySelectorAll(x)
48
- );
49
- if (t.length) {
50
- t.forEach((e) => {
51
- const n = +e.getAttribute("data-sbb-inert") - 1;
52
- e.setAttribute("data-sbb-inert", `${n}`), n && n < 0 && (y(e), Array.from(e.children).forEach((i) => y(i)));
53
- });
54
- return;
55
- }
56
- Array.from(document.documentElement.querySelectorAll("[data-sbb-inert]")).forEach(
57
- (e) => y(e)
58
- );
59
- }
60
- function S(t) {
12
+ function W(t) {
61
13
  const e = window.getComputedStyle(t), n = e.display, i = parseInt(e.maxHeight, 10).toString();
62
14
  if (n !== "none" && i !== "0")
63
15
  return {
@@ -69,58 +21,56 @@ function S(t) {
69
21
  offsetWidth: t.offsetWidth
70
22
  };
71
23
  t.style.position = "absolute", t.style.visibility = "hidden", t.style.display = "block";
72
- const a = t.scrollHeight, o = t.clientHeight, c = t.offsetHeight, u = t.scrollWidth, r = t.clientWidth, s = t.offsetWidth;
73
- return t.style.display = "", t.style.position = "", t.style.visibility = "", { scrollHeight: a, clientHeight: o, offsetHeight: c, scrollWidth: u, clientWidth: r, offsetWidth: s };
24
+ const l = t.scrollHeight, o = t.clientHeight, r = t.offsetHeight, b = t.scrollWidth, a = t.clientWidth, s = t.offsetWidth;
25
+ return t.style.display = "", t.style.position = "", t.style.visibility = "", { scrollHeight: l, clientHeight: o, offsetHeight: r, scrollWidth: b, clientWidth: a, offsetWidth: s };
74
26
  }
75
- function B(t, e) {
27
+ function P(t, e) {
76
28
  if (!t || !e)
77
29
  return !1;
78
30
  const n = t.getBoundingClientRect();
79
31
  return n.top <= e.clientY && e.clientY <= n.top + n.height && n.left <= e.clientX && e.clientX <= n.left + n.width;
80
32
  }
81
- function P(t, e, n, i) {
82
- const o = (i == null ? void 0 : i.verticalOffset) || 0, c = (i == null ? void 0 : i.horizontalOffset) || 0, u = (i == null ? void 0 : i.responsiveHeight) || !1, r = e.getBoundingClientRect(), s = S(t), f = r.left, m = r.top, g = document.documentElement.clientWidth - (f + r.width), h = m - o, A = document.documentElement.clientHeight - (m + r.height + o);
83
- let l = f, p = m + r.height + o, b = s.offsetWidth - r.width;
84
- const d = { horizontal: "start", vertical: "below" };
85
- let H = `${A - o}px`;
86
- i != null && i.centered && f - 16 + r.width / 2 > s.offsetWidth / 2 && g - 16 > b / 2 && (l -= b /= 2, d.horizontal = "center"), g < b && f > b && (l = l - b, d.horizontal = "end"), c && d.horizontal !== "center" && r.width / 2 < c && (l += c * (d.horizontal === "start" ? -1 : 1)), (f < b && g < b || document.documentElement.clientWidth < s.offsetWidth) && (l = document.documentElement.clientWidth / 2 - s.offsetWidth / 2), (A - o < s.scrollHeight && h - o > (u ? s.clientHeight : s.scrollHeight) || h > A && A - o < s.clientHeight && !u) && (p = h < s.scrollHeight ? p - r.height - h - o : m - s.clientHeight - o, H = `${h - o}px`, d.vertical = "above");
87
- const v = n.getBoundingClientRect();
88
- return v.left < 0 && (l -= v.left), v.top < 0 && (p -= v.top), {
89
- top: p,
90
- left: l,
91
- maxHeight: H,
92
- alignment: d
33
+ function g(t, e, n, i) {
34
+ const o = (i == null ? void 0 : i.verticalOffset) || 0, r = (i == null ? void 0 : i.horizontalOffset) || 0, b = (i == null ? void 0 : i.responsiveHeight) || !1, a = e.getBoundingClientRect(), s = W(t), d = a.left, m = a.top, x = document.documentElement.clientWidth - (d + a.width), u = m - o, p = document.documentElement.clientHeight - (m + a.height + o);
35
+ let c = d, v = m + a.height + o, f = s.offsetWidth - a.width;
36
+ const h = { horizontal: "start", vertical: "below" };
37
+ let y = `${p - o}px`;
38
+ i != null && i.centered && d - 16 + a.width / 2 > s.offsetWidth / 2 && x - 16 > f / 2 && (c -= f /= 2, h.horizontal = "center"), x < f && d > f && (c = c - f, h.horizontal = "end"), r && h.horizontal !== "center" && a.width / 2 < r && (c += r * (h.horizontal === "start" ? -1 : 1)), (d < f && x < f || document.documentElement.clientWidth < s.offsetWidth) && (c = document.documentElement.clientWidth / 2 - s.offsetWidth / 2), (p - o < s.scrollHeight && u - o > (b ? s.clientHeight : s.scrollHeight) || u > p && p - o < s.clientHeight && !b) && (v = u < s.scrollHeight ? v - a.height - u - o : m - s.clientHeight - o, y = `${u - o}px`, h.vertical = "above");
39
+ const A = n.getBoundingClientRect();
40
+ return A.left < 0 && (c -= A.left), A.top < 0 && (v -= A.top), {
41
+ top: v,
42
+ left: c,
43
+ maxHeight: y,
44
+ alignment: h
93
45
  };
94
46
  }
95
- function I(t, e, n, i, a) {
47
+ function R(t, e, n, i, l) {
96
48
  if (!t || !e)
97
49
  return;
98
- a.style.setProperty("--sbb-options-panel-width", `${e.offsetWidth}px`), a.style.setProperty("--sbb-options-panel-origin-height", `${e.offsetHeight}px`);
99
- const o = P(n, e, i);
100
- a.style.setProperty("--sbb-options-panel-position-x", `${o.left}px`), a.style.setProperty("--sbb-options-panel-position-y", `${o.top}px`), a.style.setProperty("--sbb-options-panel-max-height", o.maxHeight), a.setAttribute("data-options-panel-position", o.alignment.vertical), e.setAttribute("data-options-panel-position", o.alignment.vertical);
50
+ l.style.setProperty("--sbb-options-panel-width", `${e.offsetWidth}px`), l.style.setProperty("--sbb-options-panel-origin-height", `${e.offsetHeight}px`);
51
+ const o = g(n, e, i);
52
+ l.style.setProperty("--sbb-options-panel-position-x", `${o.left}px`), l.style.setProperty("--sbb-options-panel-position-y", `${o.top}px`), l.style.setProperty("--sbb-options-panel-max-height", o.maxHeight), l.setAttribute("data-options-panel-position", o.alignment.vertical), e.setAttribute("data-options-panel-position", o.alignment.vertical);
101
53
  }
102
- function Y(t, e, n, i) {
54
+ function $(t, e, n, i) {
103
55
  t && (t.setAttribute("aria-haspopup", e), t.setAttribute("aria-controls", n), t.setAttribute("aria-expanded", `${i === "opening" || i === "opened"}`));
104
56
  }
105
- function M(t) {
57
+ function z(t) {
106
58
  t && (t.removeAttribute("aria-haspopup"), t.removeAttribute("aria-controls"), t.removeAttribute("aria-expanded"));
107
59
  }
108
- function X(t, e, n, i = "listbox") {
60
+ function C(t, e, n, i = "listbox") {
109
61
  t && (t.setAttribute("autocomplete", "off"), t.setAttribute("role", "combobox"), t.setAttribute("aria-autocomplete", "list"), t.setAttribute("aria-haspopup", i), t.setAttribute("aria-controls", e), t.setAttribute("aria-owns", e), t.setAttribute("aria-expanded", `${n}`));
110
62
  }
111
- function q(t) {
63
+ function B(t) {
112
64
  t && (t.removeAttribute("autocomplete"), t.removeAttribute("role"), t.removeAttribute("aria-autocomplete"), t.removeAttribute("aria-haspopup"), t.removeAttribute("aria-controls"), t.removeAttribute("aria-owns"), t.removeAttribute("aria-expanded"));
113
65
  }
114
66
  export {
115
- C as applyInertMechanism,
116
- P as getElementPosition,
117
- S as getElementRectangle,
118
- B as isEventOnElement,
119
- $ as overlayGapFixCorners,
120
- q as removeAriaComboBoxAttributes,
121
- M as removeAriaOverlayTriggerAttributes,
122
- z as removeInertMechanism,
123
- X as setAriaComboBoxAttributes,
124
- Y as setAriaOverlayTriggerAttributes,
125
- I as setOverlayPosition
67
+ g as getElementPosition,
68
+ W as getElementRectangle,
69
+ P as isEventOnElement,
70
+ O as overlayGapFixCorners,
71
+ B as removeAriaComboBoxAttributes,
72
+ z as removeAriaOverlayTriggerAttributes,
73
+ C as setAriaComboBoxAttributes,
74
+ $ as setAriaOverlayTriggerAttributes,
75
+ R as setOverlayPosition
126
76
  };