@orangelogic/design-system 2.207.0 → 2.209.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.
@@ -1,29 +1,37 @@
1
- import { n as c, C as p } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
- import { c as b } from "../chunks/component.styles.CRO4Odto.js";
3
- import { c as g } from "../chunks/custom-element.L4WJXn1j.js";
4
- import { L as v } from "../chunks/i18n.DbXTTLXx.js";
5
- import { i as y, x as f } from "../chunks/lit-element.jLBm65_O.js";
6
- import { r as w } from "../chunks/state.CSDxrqLd.js";
7
- import { e as x } from "../chunks/query.BBf1UFkC.js";
8
- import { n as k } from "../chunks/when.Dr1es41R.js";
9
- import M from "./menu-item.js";
10
- var d = /* @__PURE__ */ ((e) => (e.Default = "default", e.Multiple = "multiple", e))(d || {});
11
- const A = y`:host{background:var(--cx-panel-background-color);border:solid var(--cx-panel-border-width) var(--cx-panel-border-color);border-radius:var(--cx-panel-border-radius,var(--cx-border-radius-large));padding:var(--cx-panel-padding,var(--cx-spacing-x-small) 0);--divider-color:var(--cx-panel-border-color);--divider-width:var(--cx-panel-border-width);--divider-spacing:var(--cx-spacing-x-small);display:block;position:relative;overflow:auto}:host([horizontal]){padding:0 var(--cx-spacing-x-small);flex-wrap:wrap;justify-content:space-between;display:flex}::slotted(cx-divider){--color:var(--divider-color);--width:var(--divider-width);--spacing:var(--divider-spacing)}::slotted([data-alternating-grouping]):before{content:" ";background-color:var(--divider-color);margin:var(--divider-spacing) 0;height:var(--divider-width);display:block}::slotted([data-alternating-grouping=horizontal]):before{height:100%;margin:0 var(--divider-spacing);width:var(--divider-width);display:inline-block}:host([horizontal]) ::slotted(cx-menu-section){flex-wrap:wrap;justify-content:space-between;display:flex}:host([horizontal]) ::slotted(cx-menu-item){display:flex}:host([variant=multiple]){position:relative;overflow:hidden}:host([variant=multiple]) ::slotted(cx-menu[name]){opacity:0;pointer-events:none;transition:opacity var(--cx-transition-fast) ease-in-out, transform var(--cx-transition-medium) ease-in-out;border:none;top:0;left:0;transform:translate(-50%);position:absolute!important}:host([variant=multiple]) ::slotted(cx-menu[active]){opacity:1;pointer-events:auto;transform:translate(0)}.back__button::part(checked-icon),.back__button::part(submenu-icon){display:none}.back__divider{--spacing:var(--cx-spacing-x-small)}`;
12
- var I = Object.defineProperty, C = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
13
- for (var o = i > 1 ? void 0 : i ? C(t, r) : t, h = e.length - 1, n; h >= 0; h--)
14
- (n = e[h]) && (o = (i ? n(t, r, o) : n(o)) || o);
15
- return i && o && I(t, r, o), o;
1
+ import { n as u, C as g } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
+ import { c as v } from "../chunks/component.styles.CRO4Odto.js";
3
+ import { c as y } from "../chunks/custom-element.L4WJXn1j.js";
4
+ import { L as x } from "../chunks/i18n.DbXTTLXx.js";
5
+ import { i as w, x as b } from "../chunks/lit-element.jLBm65_O.js";
6
+ import { r as k } from "../chunks/state.CSDxrqLd.js";
7
+ import { e as M } from "../chunks/query.BBf1UFkC.js";
8
+ import { n as A } from "../chunks/when.Dr1es41R.js";
9
+ import I from "./menu-item.js";
10
+ var p = /* @__PURE__ */ ((e) => (e.Default = "default", e.Multiple = "multiple", e))(p || {});
11
+ const S = w`:host{background:var(--cx-panel-background-color);border:solid var(--cx-panel-border-width) var(--cx-panel-border-color);border-radius:var(--cx-panel-border-radius,var(--cx-border-radius-large));padding:var(--cx-panel-padding,var(--cx-spacing-x-small) 0);--divider-color:var(--cx-panel-border-color);--divider-width:var(--cx-panel-border-width);--divider-spacing:var(--cx-spacing-x-small);display:block;position:relative;overflow:auto}:host([horizontal]){padding:0 var(--cx-spacing-x-small);flex-wrap:wrap;justify-content:space-between;display:flex}::slotted(cx-divider){--color:var(--divider-color);--width:var(--divider-width);--spacing:var(--divider-spacing)}::slotted([data-alternating-grouping]):before{content:" ";background-color:var(--divider-color);margin:var(--divider-spacing) 0;height:var(--divider-width);display:block}::slotted([data-alternating-grouping=horizontal]):before{height:100%;margin:0 var(--divider-spacing);width:var(--divider-width);display:inline-block}:host([horizontal]) ::slotted(cx-menu-section){flex-wrap:wrap;justify-content:space-between;display:flex}:host([horizontal]) ::slotted(cx-menu-item){display:flex}:host([variant=multiple]){position:relative;overflow:hidden}:host([variant=multiple]) ::slotted(cx-menu[name]){opacity:0;pointer-events:none;transition:opacity var(--cx-transition-fast) ease-in-out, transform var(--cx-transition-medium) ease-in-out;border:none;top:0;left:0;transform:translate(-50%);position:absolute!important}:host([variant=multiple]) ::slotted(cx-menu[active]){opacity:1;pointer-events:auto;transform:translate(0)}.back__button::part(checked-icon),.back__button::part(submenu-icon){display:none}.back__divider{--spacing:var(--cx-spacing-x-small)}`;
12
+ var E = Object.defineProperty, C = Object.getOwnPropertyDescriptor, c = (e, t, i, s) => {
13
+ for (var a = s > 1 ? void 0 : s ? C(t, i) : t, o = e.length - 1, h; o >= 0; o--)
14
+ (h = e[o]) && (a = (s ? h(t, i, a) : h(a)) || a);
15
+ return s && a && E(t, i, a), a;
16
16
  };
17
- function m(e) {
17
+ function f(e) {
18
18
  return e.tagName.toLowerCase() === "cx-menu" && e instanceof l && e.getAttribute("role") === "menu";
19
19
  }
20
- let l = class extends p {
20
+ let l = class extends g {
21
21
  constructor() {
22
- super(...arguments), this.localize = new v(this), this.horizontal = !1, this.variant = d.Default, this.active = !1, this.name = "", this.back = "", this.default = !1, this.bubbleKeyDown = !1, this.ignoredKeys = [], this.disabledTabLoop = !1, this.noUncheck = !1, this.resizeObserver = null, this.slotMutationObserver = null;
22
+ super(...arguments), this.localize = new x(this), this.horizontal = !1, this.variant = p.Default, this.active = !1, this.name = "", this.back = "", this.default = !1, this.bubbleKeyDown = !1, this.ignoredKeys = [], this.disabledTabLoop = !1, this.noUncheck = !1, this.resizeObserver = null, this.slotMutationObserver = null;
23
23
  }
24
24
  connectedCallback() {
25
- super.connectedCallback(), this.slotMutationObserver = new MutationObserver(() => this.handleSlotChange()), this.slotMutationObserver.observe(this, {
26
- attributeFilter: ["inert", "is-empty"],
25
+ super.connectedCallback(), this.slotMutationObserver = new MutationObserver((e) => {
26
+ if (e.every(
27
+ (i) => i.type === "attributes" && (i.attributeName === "checked" || i.attributeName === "active")
28
+ )) {
29
+ this.syncTabIndexToSelection();
30
+ return;
31
+ }
32
+ this.handleSlotChange();
33
+ }), this.slotMutationObserver.observe(this, {
34
+ attributeFilter: ["active", "checked", "inert", "is-empty"],
27
35
  attributes: !0,
28
36
  subtree: !0
29
37
  });
@@ -32,7 +40,7 @@ let l = class extends p {
32
40
  super.disconnectedCallback(), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.slotMutationObserver && (this.slotMutationObserver.disconnect(), this.slotMutationObserver = null);
33
41
  }
34
42
  runFirstUpdated() {
35
- if (this.setAttribute("role", "menu"), this.variant === d.Multiple) {
43
+ if (this.setAttribute("role", "menu"), this.variant === p.Multiple) {
36
44
  const e = this.getAllSubMenus();
37
45
  this.setActiveMenu(e[0]?.name ?? ""), this.updateComplete.then(() => {
38
46
  this.adjustMenuSize();
@@ -40,132 +48,129 @@ let l = class extends p {
40
48
  }
41
49
  }
42
50
  handleClick(e) {
43
- const t = ["menuitem", "menuitemcheckbox"], r = e.composedPath(), i = r.find(
44
- (a) => t.includes(a?.getAttribute?.("role") || "")
51
+ const t = ["menuitem", "menuitemcheckbox"], i = e.composedPath(), s = i.find(
52
+ (n) => t.includes(n?.getAttribute?.("role") || "")
45
53
  );
46
- if (!i)
54
+ if (!s)
47
55
  return;
48
- const o = i.menu;
49
- if (o) {
50
- this.setActiveMenu(o);
56
+ const a = s.menu;
57
+ if (a) {
58
+ this.setActiveMenu(a);
51
59
  return;
52
60
  }
53
- if (r.find(
54
- (a) => a?.getAttribute?.("role") === "menu"
61
+ if (i.find(
62
+ (n) => n?.getAttribute?.("role") === "menu"
55
63
  ) !== this)
56
64
  return;
57
- const s = i;
58
- s.type === "checkbox" && (s.checked && (this.noUncheck || s.noUncheck) || (s.checked = !s.checked)), this.emit("cx-select", { detail: { item: s } });
65
+ const d = s;
66
+ d.type === "checkbox" && (d.checked && (this.noUncheck || d.noUncheck) || (d.checked = !d.checked)), this.emit("cx-select", { detail: { item: d } });
59
67
  }
60
68
  handleKeyDown(e) {
61
- if (!this.ignoredKeys.includes(e.key)) {
62
- if (this.isMenuItem(e.target) && (e.key === "Enter" || e.key === " ")) {
63
- const t = this.getCurrentItem();
64
- e.preventDefault(), this.bubbleKeyDown || e.stopPropagation(), t?.click();
65
- } else if ([
66
- "Home",
67
- "End",
68
- "Tab",
69
- "ArrowDown",
70
- "ArrowUp",
71
- "ArrowLeft",
72
- "ArrowRight"
73
- ].includes(e.key)) {
74
- const t = this.getAllItems(), r = this.getCurrentItem();
75
- let i = r ? t.indexOf(r) : 0;
76
- if (["ArrowLeft", "ArrowRight"].includes(e.key) && !this.bubbleKeyDown && !(this.parentElement instanceof l) && !(this.parentElement instanceof M) && e.stopPropagation(), t.length > 0) {
77
- const o = this.horizontal ? e.key === "ArrowRight" || i === t.length - 1 && e.key === "ArrowDown" : e.key === "ArrowDown", h = this.horizontal ? e.key === "ArrowLeft" || i === 0 && e.key === "ArrowUp" : e.key === "ArrowUp";
78
- if (["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp"].includes(
79
- e.key
80
- ) && !o && !h)
81
- return;
82
- if (this.bubbleKeyDown || e.stopPropagation(), o || e.key === "Tab" && !e.shiftKey)
83
- i++;
84
- else if (h || e.key === "Tab" && e.shiftKey)
85
- i--;
86
- else if (e.key === "Home") {
87
- e.preventDefault();
88
- let n = this.parentElement?.firstElementChild;
89
- for (; n && !m(n); )
90
- n = n.nextElementSibling;
91
- if (n) {
92
- const s = n.getAllItems();
93
- if (s.length > 0) {
94
- n.setCurrentItem(s[0]), s[0].focus();
95
- return;
96
- }
69
+ if (this.ignoredKeys.includes(e.key))
70
+ return;
71
+ const t = e.target, i = this.isMenuItem(t) ? t : void 0;
72
+ if (i && (e.key === "Enter" || e.key === " "))
73
+ e.preventDefault(), this.bubbleKeyDown || e.stopPropagation(), i.click();
74
+ else if ([
75
+ "Home",
76
+ "End",
77
+ "ArrowDown",
78
+ "ArrowUp",
79
+ "ArrowLeft",
80
+ "ArrowRight"
81
+ ].includes(e.key)) {
82
+ const s = this.getAllItems(), a = i ? s.indexOf(i) : -1;
83
+ let o = a === -1 ? s.findIndex((h) => h.getAttribute("tabindex") === "0") : a;
84
+ if (o === -1 && (o = 0), ["ArrowLeft", "ArrowRight"].includes(e.key) && !this.bubbleKeyDown && !(this.parentElement instanceof l) && !(this.parentElement instanceof I) && e.stopPropagation(), s.length > 0) {
85
+ const h = this.horizontal ? e.key === "ArrowRight" || o === s.length - 1 && e.key === "ArrowDown" : e.key === "ArrowDown", d = this.horizontal ? e.key === "ArrowLeft" || o === 0 && e.key === "ArrowUp" : e.key === "ArrowUp";
86
+ if (["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp"].includes(
87
+ e.key
88
+ ) && !h && !d)
89
+ return;
90
+ if (this.bubbleKeyDown || e.stopPropagation(), h)
91
+ o++;
92
+ else if (d)
93
+ o--;
94
+ else if (e.key === "Home") {
95
+ e.preventDefault();
96
+ let n = this.parentElement?.firstElementChild;
97
+ for (; n && !f(n); )
98
+ n = n.nextElementSibling;
99
+ if (n) {
100
+ const r = n.getAllItems();
101
+ if (r.length > 0) {
102
+ r[0].focus();
103
+ return;
97
104
  }
98
- i = 0;
99
- } else if (e.key === "End") {
100
- e.preventDefault();
101
- let n = this.parentElement?.lastElementChild;
102
- for (; n && !m(n); )
103
- n = n.previousElementSibling;
104
- if (n) {
105
- const s = n.getAllItems();
106
- if (s.length > 0) {
107
- n.setCurrentItem(s[s.length - 1]), s[s.length - 1].focus();
108
- return;
109
- }
105
+ }
106
+ o = 0;
107
+ } else if (e.key === "End") {
108
+ e.preventDefault();
109
+ let n = this.parentElement?.lastElementChild;
110
+ for (; n && !f(n); )
111
+ n = n.previousElementSibling;
112
+ if (n) {
113
+ const r = n.getAllItems();
114
+ if (r.length > 0) {
115
+ r[r.length - 1].focus();
116
+ return;
110
117
  }
111
- i = 0;
112
118
  }
113
- if (i < 0 && !this.disabledTabLoop) {
114
- e.preventDefault();
115
- let n = this.previousElementSibling;
116
- for (; n && !m(n); )
117
- n = n.previousElementSibling;
118
- if (n) {
119
- const s = n.getAllItems();
120
- if (s.length > 0) {
121
- n.setCurrentItem(
122
- s[s.length - 1]
123
- ), s[s.length - 1].focus();
119
+ o = 0;
120
+ }
121
+ if (o < 0 && !this.disabledTabLoop) {
122
+ e.preventDefault();
123
+ let n = this.previousElementSibling;
124
+ for (; n && !f(n); )
125
+ n = n.previousElementSibling;
126
+ if (n) {
127
+ const r = n.getAllItems();
128
+ if (r.length > 0) {
129
+ r[r.length - 1].focus();
130
+ return;
131
+ }
132
+ } else {
133
+ let r = this.parentElement?.lastElementChild;
134
+ for (; r && !f(r); )
135
+ r = r.previousElementSibling;
136
+ if (r) {
137
+ const m = r.getAllItems();
138
+ if (m.length > 0) {
139
+ m[m.length - 1].focus();
124
140
  return;
125
141
  }
126
- } else {
127
- let s = this.parentElement?.lastElementChild;
128
- for (; s && !m(s); )
129
- s = s.previousElementSibling;
130
- if (s) {
131
- const a = s.getAllItems();
132
- if (a.length > 0) {
133
- s.setCurrentItem(a[a.length - 1]), a[a.length - 1].focus();
134
- return;
135
- }
136
- }
137
- i = 0;
138
142
  }
143
+ o = 0;
139
144
  }
140
- if (i > t.length - 1 && !this.disabledTabLoop) {
141
- e.preventDefault();
142
- let n = this.nextElementSibling;
143
- for (; n && !m(n); )
144
- n = n.nextElementSibling;
145
- if (n) {
146
- const s = n.getAllItems();
147
- if (s.length > 0) {
148
- n.setCurrentItem(s[0]), s[0].focus();
145
+ }
146
+ if (o > s.length - 1 && !this.disabledTabLoop) {
147
+ e.preventDefault();
148
+ let n = this.nextElementSibling;
149
+ for (; n && !f(n); )
150
+ n = n.nextElementSibling;
151
+ if (n) {
152
+ const r = n.getAllItems();
153
+ if (r.length > 0) {
154
+ r[0].focus();
155
+ return;
156
+ }
157
+ } else {
158
+ let r = this.parentElement?.firstElementChild;
159
+ for (; r && !f(r); )
160
+ r = r.nextElementSibling;
161
+ if (r) {
162
+ const m = r.getAllItems();
163
+ if (m.length > 0) {
164
+ m[0].focus();
149
165
  return;
150
166
  }
151
- } else {
152
- let s = this.parentElement?.firstElementChild;
153
- for (; s && !m(s); )
154
- s = s.nextElementSibling;
155
- if (s) {
156
- const a = s.getAllItems();
157
- if (a.length > 0) {
158
- s.setCurrentItem(a[0]), a[0].focus();
159
- return;
160
- }
161
- }
162
- i = 0;
163
167
  }
168
+ o = 0;
164
169
  }
165
- if (i < 0 || i > t.length - 1)
166
- return;
167
- e.preventDefault(), this.setCurrentItem(t[i]), t[i].focus();
168
170
  }
171
+ if (o < 0 || o > s.length - 1)
172
+ return;
173
+ e.preventDefault(), s[o].focus();
169
174
  }
170
175
  }
171
176
  }
@@ -174,20 +179,34 @@ let l = class extends p {
174
179
  this.isMenuItem(t) && this.setCurrentItem(t);
175
180
  }
176
181
  handleSlotChange() {
177
- const e = this.getAllItems();
178
- e.length > 0 && this.setCurrentItem(e[0]);
179
- let t = null;
180
- this.defaultSlot.assignedElements().filter((r) => {
181
- const i = r;
182
+ this.syncTabIndexToSelection();
183
+ let e = null;
184
+ this.defaultSlot.assignedElements().filter((t) => {
185
+ const i = t;
182
186
  return this.isMenuItem(i) || this.isMenuSection(i);
183
- }).forEach((r) => {
184
- const i = r, o = !i.inert && !i.hasAttribute("is-empty");
185
- t && o && (this.isMenuSection(t) && this.isMenuItem(i) || this.isMenuSection(i) && i.childElementCount > 0) ? i.setAttribute(
187
+ }).forEach((t) => {
188
+ const i = t, s = !i.inert && !i.hasAttribute("is-empty");
189
+ e && s && (this.isMenuSection(e) && this.isMenuItem(i) || this.isMenuSection(i) && i.childElementCount > 0) ? i.setAttribute(
186
190
  "data-alternating-grouping",
187
191
  this.horizontal ? "horizontal" : ""
188
- ) : i.removeAttribute("data-alternating-grouping"), o && (t = i);
192
+ ) : i.removeAttribute("data-alternating-grouping"), s && (e = i);
189
193
  });
190
194
  }
195
+ /** Sets `tabindex="0"` on the selected item (`checked`/`active`), or the first item if none is selected. */
196
+ syncTabIndexToSelection() {
197
+ const e = this.getAllItems();
198
+ if (e.length === 0)
199
+ return;
200
+ let t;
201
+ for (const i of e)
202
+ i.setAttribute("tabindex", "-1"), !t && (i.checked || i.active) && (t = i);
203
+ (t ?? e[0]).setAttribute("tabindex", "0");
204
+ }
205
+ /** Moves `tabindex="0"` directly to `item`; used by `setCurrentItem()` for explicit external placement. */
206
+ setRovingTabIndex(e) {
207
+ for (const t of this.getAllItems())
208
+ t.setAttribute("tabindex", t === e ? "0" : "-1");
209
+ }
191
210
  isMenuSection(e) {
192
211
  return e instanceof HTMLElement ? e.tagName.toLowerCase() === "cx-menu-section" : !1;
193
212
  }
@@ -200,8 +219,8 @@ let l = class extends p {
200
219
  getAllItems() {
201
220
  return this.defaultSlot.assignedElements({ flatten: !0 }).flatMap((t) => {
202
221
  if (this.isMenuSection(t)) {
203
- const r = t.shadowRoot?.querySelector("slot");
204
- return r ? [...r.assignedElements({ flatten: !0 })] : [];
222
+ const i = t.shadowRoot?.querySelector("slot");
223
+ return i ? [...i.assignedElements({ flatten: !0 })] : [];
205
224
  }
206
225
  return t;
207
226
  }).filter((t) => !(t.inert || !this.isMenuItem(t)));
@@ -212,25 +231,25 @@ let l = class extends p {
212
231
  }
213
232
  setActiveMenu(e) {
214
233
  const t = this.getAllSubMenus();
215
- let r = null;
216
- t.forEach((i) => {
217
- i.name === e ? (i.active = !0, r = i) : i.active = !1;
218
- }), this.adjustMenuSize(), r && (this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.resizeObserver = new ResizeObserver(() => {
234
+ let i = null;
235
+ t.forEach((s) => {
236
+ s.name === e ? (s.active = !0, i = s) : s.active = !1;
237
+ }), this.adjustMenuSize(), i && (this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.resizeObserver = new ResizeObserver(() => {
219
238
  this.adjustMenuSize();
220
- }), this.resizeObserver.observe(r));
239
+ }), this.resizeObserver.observe(i));
221
240
  }
222
241
  async adjustMenuSize(e = 250) {
223
242
  const t = this.getActiveMenu();
224
243
  if (t) {
225
244
  await t.updateComplete;
226
- const r = t.offsetWidth, i = t.offsetHeight;
245
+ const i = t.offsetWidth, s = t.offsetHeight;
227
246
  this.animate(
228
247
  [
229
248
  {
230
- height: this.style.height ?? `${i}px`,
231
- width: this.style.width ?? `${r}px`
249
+ height: this.style.height ?? `${s}px`,
250
+ width: this.style.width ?? `${i}px`
232
251
  },
233
- { height: `${i}px`, width: `${r}px` }
252
+ { height: `${s}px`, width: `${i}px` }
234
253
  // Fade out
235
254
  ],
236
255
  {
@@ -249,57 +268,45 @@ let l = class extends p {
249
268
  getActiveMenu() {
250
269
  return this.getAllSubMenus().find((t) => t.active) || void 0;
251
270
  }
252
- /**
253
- * @internal Gets the current menu item, which is the menu item that has `tabindex="0"` within the roving tab index.
254
- * The menu item may or may not have focus, but for keyboard interaction purposes it's considered the "active" item.
255
- */
256
- getCurrentItem() {
257
- return this.getAllItems().find((e) => e.getAttribute("tabindex") === "0");
258
- }
259
- /**
260
- * @internal Sets the current menu item to the specified element. This sets `tabindex="0"` on the target element and
261
- * `tabindex="-1"` to all other items. This method must be called prior to setting focus on a menu item.
262
- */
271
+ /** @internal Sets `tabindex="0"` on `item` and `tabindex="-1"` on all others. Call before focusing a menu item. */
263
272
  setCurrentItem(e) {
264
- this.getAllItems().forEach((r) => {
265
- r.setAttribute("tabindex", r === e ? "0" : "-1");
266
- });
273
+ this.setRovingTabIndex(e);
267
274
  }
268
275
  render() {
269
- const e = k(
276
+ const e = A(
270
277
  this.back,
271
- () => f`<slot name="back-button" role="menuitem" menu=${this.back}><cx-menu-item part="back-button" class="back__button" menu=${this.back}><cx-icon slot="prefix" name="chevron_left"></cx-icon>${this.localize.term("back")}</cx-menu-item><cx-divider class="back__divider"></cx-divider></slot>`
278
+ () => b`<slot name="back-button" role="menuitem" menu=${this.back}><cx-menu-item part="back-button" class="back__button" menu=${this.back}><cx-icon slot="prefix" name="chevron_left"></cx-icon>${this.localize.term("back")}</cx-menu-item><cx-divider class="back__divider"></cx-divider></slot>`
272
279
  );
273
- return this.variant === d.Multiple ? f`${e}<slot @slotchange=${this.handleSlotChange} @click=${this.handleClick} @keydown=${this.handleKeyDown} @mousedown=${this.handleMouseDown}></slot>` : f`${e}<slot @slotchange=${this.handleSlotChange} @click=${this.handleClick} @keydown=${this.handleKeyDown} @mousedown=${this.handleMouseDown}></slot>`;
280
+ return this.variant === p.Multiple ? b`${e}<slot @slotchange=${this.handleSlotChange} @click=${this.handleClick} @keydown=${this.handleKeyDown} @mousedown=${this.handleMouseDown}></slot>` : b`${e}<slot @slotchange=${this.handleSlotChange} @click=${this.handleClick} @keydown=${this.handleKeyDown} @mousedown=${this.handleMouseDown}></slot>`;
274
281
  }
275
282
  };
276
- l.styles = [b, A];
277
- u([
278
- x("slot")
283
+ l.styles = [v, S];
284
+ c([
285
+ M("slot:not([name])")
279
286
  ], l.prototype, "defaultSlot", 2);
280
- u([
281
- c({ type: Boolean })
287
+ c([
288
+ u({ type: Boolean })
282
289
  ], l.prototype, "horizontal", 2);
283
- u([
284
- c({ reflect: !0 })
290
+ c([
291
+ u({ reflect: !0 })
285
292
  ], l.prototype, "variant", 2);
286
- u([
287
- c({ reflect: !0, type: Boolean })
293
+ c([
294
+ u({ reflect: !0, type: Boolean })
288
295
  ], l.prototype, "active", 2);
289
- u([
290
- c({ reflect: !0 })
296
+ c([
297
+ u({ reflect: !0 })
291
298
  ], l.prototype, "name", 2);
292
- u([
293
- c({ reflect: !0 })
299
+ c([
300
+ u({ reflect: !0 })
294
301
  ], l.prototype, "back", 2);
295
- u([
296
- c({ reflect: !0, type: Boolean })
302
+ c([
303
+ u({ reflect: !0, type: Boolean })
297
304
  ], l.prototype, "default", 2);
298
- u([
299
- c({ attribute: "bubble-keydown", reflect: !0, type: Boolean })
305
+ c([
306
+ u({ attribute: "bubble-keydown", reflect: !0, type: Boolean })
300
307
  ], l.prototype, "bubbleKeyDown", 2);
301
- u([
302
- c({
308
+ c([
309
+ u({
303
310
  attribute: "ignored-keys",
304
311
  converter: {
305
312
  fromAttribute: (e) => e?.split(" ") ?? [],
@@ -308,17 +315,17 @@ u([
308
315
  type: String
309
316
  })
310
317
  ], l.prototype, "ignoredKeys", 2);
311
- u([
312
- c({ attribute: "disabled-tab-loop", reflect: !0, type: Boolean })
318
+ c([
319
+ u({ attribute: "disabled-tab-loop", reflect: !0, type: Boolean })
313
320
  ], l.prototype, "disabledTabLoop", 2);
314
- u([
315
- c({ attribute: "no-uncheck", reflect: !0, type: Boolean })
321
+ c([
322
+ u({ attribute: "no-uncheck", reflect: !0, type: Boolean })
316
323
  ], l.prototype, "noUncheck", 2);
317
- u([
318
- w()
324
+ c([
325
+ k()
319
326
  ], l.prototype, "resizeObserver", 2);
320
- l = u([
321
- g("cx-menu")
327
+ l = c([
328
+ y("cx-menu")
322
329
  ], l);
323
330
  export {
324
331
  l as default