@luzmo/lucero 0.0.38 → 0.0.39

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 (35) hide show
  1. package/components/action-menu/index.cjs +1 -1
  2. package/components/action-menu/index.js +1 -1
  3. package/components/button/index.cjs +1 -1
  4. package/components/button/index.js +17 -17
  5. package/components/color-menu/color-menu.d.ts +5 -3
  6. package/components/color-menu/index.cjs +6 -6
  7. package/components/color-menu/index.js +10 -6
  8. package/components/color-picker/index.cjs +2 -3
  9. package/components/color-picker/index.js +22 -22
  10. package/components/index.cjs +1 -1
  11. package/components/index.js +58 -56
  12. package/components/menu/index.cjs +1 -1
  13. package/components/menu/index.js +1 -1
  14. package/components/overlay/hover-controller.d.ts +2 -0
  15. package/components/overlay/index.cjs +7 -7
  16. package/components/overlay/index.js +114 -110
  17. package/components/overlay/interaction-controller.d.ts +11 -5
  18. package/components/overlay/overlay-stack.d.ts +1 -0
  19. package/components/overlay/overlay-trigger.d.ts +25 -2
  20. package/components/{overlay-BBNyvs8F.js → overlay-DaOKAKMl.js} +423 -387
  21. package/components/overlay-lzq2PziH.cjs +47 -0
  22. package/components/picker/index.cjs +1 -1
  23. package/components/picker/index.js +2 -2
  24. package/components/{picker-daUT4cUN.js → picker-BmoXv1jt.js} +1 -1
  25. package/components/{picker-0tQg3Aob.cjs → picker-DWsBWdPN.cjs} +1 -1
  26. package/components/select/index.cjs +1 -1
  27. package/components/select/index.js +1 -1
  28. package/components/strategies-BACP6MhR.cjs +18 -0
  29. package/custom-elements.json +1 -1
  30. package/package.json +1 -1
  31. package/utils/button-interaction-controllers/interaction-controller.d.ts +1 -0
  32. package/utils/button-interaction-controllers/mobile-controller.d.ts +0 -1
  33. package/components/overlay-o0tLxsk-.cjs +0 -47
  34. package/components/strategies-DGwsR7Xf.cjs +0 -18
  35. package/components/{strategies-Bc3hG-HA.js → strategies-9indNIEb.js} +1 -1
@@ -15,15 +15,15 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { e as f, I as O, s as $, L as S } from "../overlay-BBNyvs8F.js";
19
- import { C as G, H as M, b as J, c as K, d as Q, P as W, V as X, g as Y, a as Z, n as ee, o as te, p as oe } from "../overlay-BBNyvs8F.js";
20
- import { a as E, r as w, x as c, n as u, E as z, B as b } from "../base-WsynuqaS.js";
21
- import { r as h } from "../state-Deh-vKYE.js";
22
- import { e as g } from "../query-D_KR_GUc.js";
23
- import { e as v } from "../directive-oAbCiebi.js";
18
+ import { e as f, I as O, s as S, L as $ } from "../overlay-DaOKAKMl.js";
19
+ import { C as D, H as M, b as J, c as K, d as Q, P as W, S as X, V as Y, g as Z, l as ee, a as te, n as oe, o as re, p as le } from "../overlay-DaOKAKMl.js";
20
+ import { a as E, r as w, x as m, n as c, E as z, B as v } from "../base-WsynuqaS.js";
21
+ import { r as g } from "../state-Deh-vKYE.js";
22
+ import { e as h } from "../query-D_KR_GUc.js";
23
+ import { e as b } from "../directive-oAbCiebi.js";
24
24
  import { f as A } from "../async-directive-BfcqVjDp.js";
25
25
  import { r as y } from "../slottable-request-event-DggLA4Rx.js";
26
- import { S as le } from "../slottable-request-event-DggLA4Rx.js";
26
+ import { S as ne } from "../slottable-request-event-DggLA4Rx.js";
27
27
  const k = () => {
28
28
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
29
29
  const i = document.createElement("style");
@@ -32,12 +32,12 @@ const k = () => {
32
32
  };
33
33
  k();
34
34
  const F = ":host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}";
35
- var T = Object.defineProperty, s = (i, e, t, o) => {
36
- for (var r = void 0, n = i.length - 1, a; n >= 0; n--)
37
- (a = i[n]) && (r = a(e, t, r) || r);
38
- return r && T(e, t, r), r;
35
+ var I = Object.defineProperty, s = (i, e, o, t) => {
36
+ for (var l = void 0, n = i.length - 1, a; n >= 0; n--)
37
+ (a = i[n]) && (l = a(e, o, l) || l);
38
+ return l && I(e, o, l), l;
39
39
  };
40
- class l extends E {
40
+ class r extends E {
41
41
  constructor() {
42
42
  super(...arguments), this.content = "click hover longpress", this.offset = 6, this.disabled = !1, this.receivesFocus = "auto", this.clickContent = [], this.longpressContent = [], this.hoverContent = [], this.targetContent = [];
43
43
  }
@@ -67,31 +67,30 @@ class l extends E {
67
67
  }
68
68
  }
69
69
  handleBeforetoggle(e) {
70
- const { target: t } = e;
71
- let o;
72
- if (t === this.clickOverlayElement)
73
- o = "click";
74
- else if (t === this.longpressOverlayElement)
75
- o = "longpress";
76
- else if (t === this.hoverOverlayElement)
77
- o = "hover";
70
+ const { target: o } = e;
71
+ let t;
72
+ if (o === this.clickOverlayElement)
73
+ t = "click";
74
+ else if (o === this.longpressOverlayElement)
75
+ t = "longpress";
76
+ else if (o === this.hoverOverlayElement)
77
+ t = "hover";
78
78
  else
79
79
  return;
80
- e.newState === "open" ? this.open = o : this.open === o && (this.open = void 0);
80
+ e.newState === "open" ? this.open = t : this.open === t && (this.open = void 0);
81
81
  }
82
82
  update(e) {
83
- var t, o, r, n, a, m;
84
- e.has("clickContent") && (this.clickPlacement = ((t = this.clickContent[0]) == null ? void 0 : t.getAttribute("placement")) || ((o = this.clickContent[0]) == null ? void 0 : o.getAttribute("direction")) || void 0), e.has("hoverContent") && (this.hoverPlacement = ((r = this.hoverContent[0]) == null ? void 0 : r.getAttribute("placement")) || ((n = this.hoverContent[0]) == null ? void 0 : n.getAttribute("direction")) || void 0), e.has("longpressContent") && (this.longpressPlacement = ((a = this.longpressContent[0]) == null ? void 0 : a.getAttribute("placement")) || ((m = this.longpressContent[0]) == null ? void 0 : m.getAttribute("direction")) || void 0), super.update(e);
83
+ var o, t, l, n, a, u;
84
+ e.has("clickContent") && (this.clickPlacement = ((o = this.clickContent[0]) == null ? void 0 : o.getAttribute("placement")) || ((t = this.clickContent[0]) == null ? void 0 : t.getAttribute("direction")) || void 0), e.has("hoverContent") && (this.hoverPlacement = ((l = this.hoverContent[0]) == null ? void 0 : l.getAttribute("placement")) || ((n = this.hoverContent[0]) == null ? void 0 : n.getAttribute("direction")) || void 0), e.has("longpressContent") && (this.longpressPlacement = ((a = this.longpressContent[0]) == null ? void 0 : a.getAttribute("placement")) || ((u = this.longpressContent[0]) == null ? void 0 : u.getAttribute("direction")) || void 0), super.update(e);
85
85
  }
86
86
  renderSlot(e) {
87
- return c`
87
+ return m`
88
88
  <slot name=${e} @slotchange=${this.handleSlotContent}></slot>
89
89
  `;
90
90
  }
91
91
  renderClickOverlay() {
92
- import("../overlay-BBNyvs8F.js").then((t) => t.f);
93
- const e = this.renderSlot("click-content");
94
- return this.clickContent.length === 0 ? e : c`
92
+ var t;
93
+ const e = this.renderSlot("click-content"), o = m`
95
94
  <luzmo-overlay
96
95
  id="click-overlay"
97
96
  ?disabled=${this.disabled || this.clickContent.length === 0}
@@ -107,11 +106,11 @@ class l extends E {
107
106
  ${e}
108
107
  </luzmo-overlay>
109
108
  `;
109
+ return (t = this.triggeredBy) != null && t.includes("click") ? o : this.clickContent.length === 0 ? e : o;
110
110
  }
111
111
  renderHoverOverlay() {
112
- import("../overlay-BBNyvs8F.js").then((t) => t.f);
113
- const e = this.renderSlot("hover-content");
114
- return this.hoverContent.length === 0 ? e : c`
112
+ var t;
113
+ const e = this.renderSlot("hover-content"), o = m`
115
114
  <luzmo-overlay
116
115
  id="hover-overlay"
117
116
  ?open=${this.open === "hover" && this.hoverContent.length > 0}
@@ -127,11 +126,11 @@ class l extends E {
127
126
  ${e}
128
127
  </luzmo-overlay>
129
128
  `;
129
+ return (t = this.triggeredBy) != null && t.includes("hover") ? o : this.hoverContent.length === 0 ? e : o;
130
130
  }
131
131
  renderLongpressOverlay() {
132
- import("../overlay-BBNyvs8F.js").then((t) => t.f);
133
- const e = this.renderSlot("longpress-content");
134
- return this.longpressContent.length === 0 ? e : c`
132
+ var t;
133
+ const e = this.renderSlot("longpress-content"), o = m`
135
134
  <luzmo-overlay
136
135
  id="longpress-overlay"
137
136
  ?disabled=${this.disabled || this.longpressContent.length === 0}
@@ -148,19 +147,19 @@ class l extends E {
148
147
  </luzmo-overlay>
149
148
  <slot name="longpress-describedby-descriptor"></slot>
150
149
  `;
150
+ return (t = this.triggeredBy) != null && t.includes("longpress") ? o : this.longpressContent.length === 0 ? e : o;
151
151
  }
152
152
  render() {
153
- const e = this.content.split(" ");
154
- return c`
153
+ return m`
155
154
  <slot
156
155
  id="trigger"
157
156
  name="trigger"
158
157
  @slotchange=${this.handleTriggerContent}
159
158
  ></slot>
160
159
  ${[
161
- e.includes("click") ? this.renderClickOverlay() : c``,
162
- e.includes("hover") ? this.renderHoverOverlay() : c``,
163
- e.includes("longpress") ? this.renderLongpressOverlay() : c``
160
+ this.renderClickOverlay(),
161
+ this.renderHoverOverlay(),
162
+ this.renderLongpressOverlay()
164
163
  ]}
165
164
  `;
166
165
  }
@@ -175,53 +174,56 @@ class l extends E {
175
174
  }
176
175
  }
177
176
  s([
178
- u()
179
- ], l.prototype, "content");
177
+ c()
178
+ ], r.prototype, "content");
180
179
  s([
181
- u({ reflect: !0 })
182
- ], l.prototype, "placement");
180
+ c({ attribute: "triggered-by" })
181
+ ], r.prototype, "triggeredBy");
183
182
  s([
184
- u()
185
- ], l.prototype, "type");
183
+ c({ reflect: !0 })
184
+ ], r.prototype, "placement");
186
185
  s([
187
- u({ type: Number })
188
- ], l.prototype, "offset");
186
+ c()
187
+ ], r.prototype, "type");
189
188
  s([
190
- u({ reflect: !0 })
191
- ], l.prototype, "open");
189
+ c({ type: Number })
190
+ ], r.prototype, "offset");
192
191
  s([
193
- u({ type: Boolean, reflect: !0 })
194
- ], l.prototype, "disabled");
192
+ c({ reflect: !0 })
193
+ ], r.prototype, "open");
195
194
  s([
196
- u({ attribute: "receives-focus" })
197
- ], l.prototype, "receivesFocus");
195
+ c({ type: Boolean, reflect: !0 })
196
+ ], r.prototype, "disabled");
198
197
  s([
199
- h()
200
- ], l.prototype, "clickContent");
198
+ c({ attribute: "receives-focus" })
199
+ ], r.prototype, "receivesFocus");
201
200
  s([
202
- h()
203
- ], l.prototype, "longpressContent");
201
+ g()
202
+ ], r.prototype, "clickContent");
204
203
  s([
205
- h()
206
- ], l.prototype, "hoverContent");
204
+ g()
205
+ ], r.prototype, "longpressContent");
207
206
  s([
208
- h()
209
- ], l.prototype, "targetContent");
207
+ g()
208
+ ], r.prototype, "hoverContent");
210
209
  s([
211
- g("#click-overlay", !0)
212
- ], l.prototype, "clickOverlayElement");
210
+ g()
211
+ ], r.prototype, "targetContent");
213
212
  s([
214
- g("#longpress-overlay", !0)
215
- ], l.prototype, "longpressOverlayElement");
213
+ h("#click-overlay", !0)
214
+ ], r.prototype, "clickOverlayElement");
216
215
  s([
217
- g("#hover-overlay", !0)
218
- ], l.prototype, "hoverOverlayElement");
219
- function U(i, e, t, o) {
216
+ h("#longpress-overlay", !0)
217
+ ], r.prototype, "longpressOverlayElement");
218
+ s([
219
+ h("#hover-overlay", !0)
220
+ ], r.prototype, "hoverOverlayElement");
221
+ function U(i, e, o, t) {
220
222
  return f.open(
221
223
  i,
222
224
  e,
223
- t,
224
- o
225
+ o,
226
+ t
225
227
  );
226
228
  }
227
229
  class x extends A {
@@ -229,24 +231,24 @@ class x extends A {
229
231
  render(e) {
230
232
  return z;
231
233
  }
232
- update(e, [t]) {
233
- this.template = t, this.target !== e.element && (this.target = e.element, this.renderBefore = this.target.children[0]), this.listenerHost = this.target, this.init();
234
+ update(e, [o]) {
235
+ this.template = o, this.target !== e.element && (this.target = e.element, this.renderBefore = this.target.children[0]), this.listenerHost = this.target, this.init();
234
236
  }
235
237
  handleSlottableRequest(e) {
236
238
  if (e.target !== e.currentTarget)
237
239
  return;
238
- const t = e.data === y;
239
- b(t ? void 0 : this.template(), this.target, {
240
+ const o = e.data === y;
241
+ v(o ? void 0 : this.template(), this.target, {
240
242
  renderBefore: this.renderBefore
241
243
  });
242
244
  }
243
245
  init() {
244
- var t;
245
- (t = this.listeners) == null || t.abort(), this.listeners = new AbortController();
246
+ var o;
247
+ (o = this.listeners) == null || o.abort(), this.listeners = new AbortController();
246
248
  const { signal: e } = this.listeners;
247
249
  this.listenerHost.addEventListener(
248
250
  "slottable-request",
249
- (o) => this.handleSlottableRequest(o),
251
+ (t) => this.handleSlottableRequest(t),
250
252
  { signal: e }
251
253
  );
252
254
  }
@@ -259,8 +261,8 @@ class x extends A {
259
261
  this.init();
260
262
  }
261
263
  }
262
- const N = v(x);
263
- class I extends x {
264
+ const N = b(x);
265
+ class R extends x {
264
266
  constructor() {
265
267
  super(...arguments), this.defaultOptions = {
266
268
  triggerInteraction: "click",
@@ -273,70 +275,72 @@ class I extends x {
273
275
  };
274
276
  }
275
277
  /* c8 ignore next 9 */
276
- render(e, t) {
278
+ render(e, o) {
277
279
  return z;
278
280
  }
279
- update(e, [t, o]) {
280
- var m, d, p;
281
+ update(e, [o, t]) {
282
+ var u, d, p;
281
283
  this.options = {
282
284
  ...this.defaultOptions.overlayOptions,
283
- ...o == null ? void 0 : o.overlayOptions
284
- }, this.insertionOptions = o == null ? void 0 : o.insertionOptions, this.template = t, this.host = (m = e.options) == null ? void 0 : m.host;
285
- let r = !1;
286
- const n = (o == null ? void 0 : o.triggerInteraction) || this.defaultOptions.triggerInteraction, a = O[(d = this.strategy) == null ? void 0 : d.type] !== n;
287
- this.target !== e.element && (this.target = e.element, r = !0), (r || a) && ((p = this.strategy) == null || p.abort(), this.strategy = new $[n](this.target, {
285
+ ...t == null ? void 0 : t.overlayOptions
286
+ }, this.insertionOptions = t == null ? void 0 : t.insertionOptions, this.template = o, this.host = (u = e.options) == null ? void 0 : u.host;
287
+ let l = !1;
288
+ const n = (t == null ? void 0 : t.triggerInteraction) || this.defaultOptions.triggerInteraction, a = O[(d = this.strategy) == null ? void 0 : d.type] !== n;
289
+ this.target !== e.element && (this.target = e.element, l = !0), (l || a) && ((p = this.strategy) == null || p.abort(), this.strategy = new S[n](this.target, {
288
290
  isPersistent: !0,
289
291
  handleOverlayReady: (C) => {
290
292
  this.listenerHost = this.overlay = C, this.init();
291
293
  }
292
- })), this.strategy.open = (o == null ? void 0 : o.open) ?? !1;
294
+ })), this.strategy.open = (t == null ? void 0 : t.open) ?? !1;
293
295
  }
294
296
  handleSlottableRequest(e) {
295
- var r, n;
297
+ var l, n;
296
298
  if (e.target !== e.currentTarget)
297
299
  return;
298
- const t = e.data === y, o = {};
299
- if (this.host && (o.host = this.host), b(
300
- t ? void 0 : this.template(),
300
+ const o = e.data === y, t = {};
301
+ if (this.host && (t.host = this.host), v(
302
+ o ? void 0 : this.template(),
301
303
  this.overlay,
302
- o
303
- ), t)
304
+ t
305
+ ), o)
304
306
  this.overlay.remove();
305
307
  else {
306
- S.applyOptions(this.overlay, {
308
+ $.applyOptions(this.overlay, {
307
309
  ...this.options,
308
310
  trigger: this.target
309
311
  });
310
- const a = typeof ((r = this.insertionOptions) == null ? void 0 : r.el) == "function" ? this.insertionOptions.el() : ((n = this.insertionOptions) == null ? void 0 : n.el) || this.target, { where: m = "afterend" } = this.insertionOptions || {};
311
- a.insertAdjacentElement(m, this.overlay);
312
+ const a = typeof ((l = this.insertionOptions) == null ? void 0 : l.el) == "function" ? this.insertionOptions.el() : ((n = this.insertionOptions) == null ? void 0 : n.el) || this.target, { where: u = "afterend" } = this.insertionOptions || {};
313
+ a.insertAdjacentElement(u, this.overlay);
312
314
  }
313
315
  }
314
316
  }
315
- const V = v(I);
317
+ const G = b(R);
316
318
  customElements.get("luzmo-overlay") || customElements.define("luzmo-overlay", f);
317
- customElements.get("luzmo-overlay-trigger") || customElements.define("luzmo-overlay-trigger", l);
319
+ customElements.get("luzmo-overlay-trigger") || customElements.define("luzmo-overlay-trigger", r);
318
320
  export {
319
- G as ClickController,
321
+ D as ClickController,
320
322
  M as HoverController,
321
323
  J as InteractionController,
322
324
  O as InteractionTypes,
323
325
  K as LONGPRESS_INSTRUCTIONS,
324
326
  Q as LongpressController,
325
- S as LuzmoAbstractOverlay,
327
+ $ as LuzmoAbstractOverlay,
326
328
  f as LuzmoOverlay,
327
- l as LuzmoOverlayTrigger,
328
- I as OverlayTriggerDirective,
329
+ r as LuzmoOverlayTrigger,
330
+ R as OverlayTriggerDirective,
329
331
  W as PlacementController,
332
+ X as SAFARI_FOCUS_RING_CLASS,
330
333
  x as SlottableRequestDirective,
331
- le as SlottableRequestEvent,
332
- X as VirtualTrigger,
333
- Y as guaranteedAllTransitionend,
334
- Z as nextFrame,
335
- ee as noop,
334
+ ne as SlottableRequestEvent,
335
+ Y as VirtualTrigger,
336
+ Z as guaranteedAllTransitionend,
337
+ ee as lastInteractionType,
338
+ te as nextFrame,
339
+ oe as noop,
336
340
  U as openOverlay,
337
- te as overlayTimer,
338
- oe as placementUpdatedSymbol,
341
+ re as overlayTimer,
342
+ le as placementUpdatedSymbol,
339
343
  y as removeSlottableRequest,
340
344
  N as slottableRequest,
341
- V as trigger
345
+ G as trigger
342
346
  };
@@ -1,17 +1,22 @@
1
1
  import type { ReactiveController } from 'lit';
2
2
  import { LuzmoAbstractOverlay } from './abstract-overlay';
3
3
  export declare enum InteractionTypes {
4
- 'click' = 0,
5
- 'hover' = 1,
6
- 'longpress' = 2
4
+ click = "click",
5
+ hover = "hover",
6
+ longpress = "longpress"
7
7
  }
8
+ export declare const lastInteractionType: unique symbol;
9
+ export declare const SAFARI_FOCUS_RING_CLASS = "remove-focus-ring-safari-hack";
8
10
  export type ControllerOptions = {
9
11
  overlay?: LuzmoAbstractOverlay;
10
12
  handleOverlayReady?: (overlay: LuzmoAbstractOverlay) => void;
11
13
  isPersistent?: boolean;
12
14
  };
15
+ type InteractionTarget = HTMLElement & {
16
+ [lastInteractionType]?: InteractionTypes;
17
+ };
13
18
  export declare class InteractionController implements ReactiveController {
14
- target: HTMLElement;
19
+ target: InteractionTarget;
15
20
  abortController: AbortController;
16
21
  get activelyOpening(): boolean;
17
22
  private handleOverlayReady?;
@@ -26,7 +31,7 @@ export declare class InteractionController implements ReactiveController {
26
31
  private _overlay;
27
32
  protected isPersistent: boolean;
28
33
  type: InteractionTypes;
29
- constructor(target: HTMLElement, { overlay, isPersistent, handleOverlayReady }: ControllerOptions);
34
+ constructor(target: InteractionTarget, { overlay, isPersistent, handleOverlayReady }: ControllerOptions);
30
35
  prepareDescription(_: HTMLElement): void;
31
36
  releaseDescription(): void;
32
37
  shouldCompleteOpen(): void;
@@ -36,3 +41,4 @@ export declare class InteractionController implements ReactiveController {
36
41
  hostConnected(): void;
37
42
  hostDisconnected(): void;
38
43
  }
44
+ export {};
@@ -7,6 +7,7 @@ declare class OverlayStack {
7
7
  stack: LuzmoOverlay[];
8
8
  constructor();
9
9
  bindEvents(): void;
10
+ private handleScroll;
10
11
  private closeOverlay;
11
12
  /**
12
13
  * Cach the `pointerdownTarget` for later testing
@@ -3,21 +3,43 @@ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
3
3
  import { LuzmoElement } from '../../utils/base';
4
4
  import { LuzmoOverlay } from './overlay';
5
5
  import { OverlayTriggerInteractions } from './overlay-types';
6
+ import './overlay';
6
7
  export type OverlayContentTypes = 'click' | 'hover' | 'longpress';
8
+ type Combinations<T extends string, U extends string = T> = T extends string ? T | `${T} ${Combinations<Exclude<U, T>>}` : never;
9
+ export type TriggeredByType = Combinations<OverlayContentTypes>;
7
10
  /**
8
11
  * @element overlay-trigger
9
12
  *
10
13
  * @slot trigger - The content that will trigger the various overlays
11
14
  * @slot hover-content - The content that will be displayed on hover
12
15
  * @slot click-content - The content that will be displayed on click
13
- * @slot longpress-content - The content that will be displayed on click
16
+ * @slot longpress-content - The content that will be displayed on longpress
17
+ * @slot longpress-describedby-descriptor - Description for longpress content
14
18
  *
15
19
  * @fires luzmo-opened - Announces that the overlay has been opened
16
20
  * @fires luzmo-closed - Announces that the overlay has been closed
21
+ *
22
+ * @attr {string} placement - The placement of the overlay relative to the trigger
23
+ * @attr {number} offset - The distance between the overlay and the trigger
24
+ * @attr {boolean} disabled - Whether the overlay trigger is disabled
25
+ * @attr {string} receives-focus - How focus should be handled ('true'|'false'|'auto')
17
26
  */
18
27
  export declare class LuzmoOverlayTrigger extends LuzmoElement {
19
28
  static get styles(): CSSResultArray;
20
29
  content: string;
30
+ /**
31
+ * Optional property to optimize performance and prevent race conditions.
32
+ *
33
+ * By explicitly declaring which content types are used (e.g. "click", "longpress hover"),
34
+ * we can avoid:
35
+ * 1. Extra renders from unnecessary slot reparenting
36
+ * 2. Potential infinite render loops during content detection
37
+ * 3. Race conditions during slot assignment
38
+ *
39
+ * By only returning overlay wrappers for explicitly declared content types,
40
+ * we minimize unecessary DOM nodes, operations and ensure a more stable rendering behavior.
41
+ */
42
+ triggeredBy?: TriggeredByType;
21
43
  /**
22
44
  * @type {"top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end"}
23
45
  * @attr
@@ -48,6 +70,7 @@ export declare class LuzmoOverlayTrigger extends LuzmoElement {
48
70
  protected renderHoverOverlay(): TemplateResult;
49
71
  protected renderLongpressOverlay(): TemplateResult;
50
72
  protected render(): TemplateResult;
51
- protected updated(changes: PropertyValues): void;
73
+ protected updated(changedProperties: PropertyValues): void;
52
74
  protected getUpdateComplete(): Promise<boolean>;
53
75
  }
76
+ export {};