@mhmo91/schmancy 0.5.33 → 0.5.35

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,13 +1,13 @@
1
1
  import { css as w, html as c, nothing as ft } from "lit";
2
2
  import { property as l, customElement as p, state as h, queryAssignedElements as gt, query as tt } from "lit/decorators.js";
3
- import { Subject as ot, merge as Q, fromEvent as d, startWith as Ot, map as v, debounceTime as G, tap as z, distinctUntilChanged as et, takeUntil as y, from as dt, of as J, Observable as It, BehaviorSubject as vt, timer as zt, zip as pt, filter as wt, take as Mt, timeout as jt, bufferTime as Pt, concatMap as Wt, interval as Ht, throwIfEmpty as Lt } from "rxjs";
3
+ import { Subject as ot, merge as Q, fromEvent as d, startWith as Et, map as v, debounceTime as G, tap as z, distinctUntilChanged as et, takeUntil as y, from as dt, of as J, Observable as It, BehaviorSubject as vt, timer as zt, zip as pt, filter as wt, take as Mt, timeout as jt, bufferTime as Pt, concatMap as Wt, interval as Ht, throwIfEmpty as Rt } from "rxjs";
4
4
  import "./animated-text-COvhr8E3.js";
5
- import { a as ut, F as At, H as Rt } from "./area.component-BHtBHWVt.js";
5
+ import { a as ut, F as Nt, H as Lt } from "./area.component-BHtBHWVt.js";
6
6
  import "./autocomplete-9RkU9LmA.js";
7
7
  import "lit/directives/class-map.js";
8
8
  import "lit/directives/style-map.js";
9
9
  import { T as Z } from "./tailwind.mixin-BjDGMGbj.js";
10
- import { c as M, f as Nt } from "./ripple-Cy-nvO8W.js";
10
+ import { c as M, f as Tt } from "./ripple-Cy-nvO8W.js";
11
11
  import "lit/directives/guard.js";
12
12
  import "./boat-CUsJXaLf.js";
13
13
  import "./spinner-XN4W5ihQ.js";
@@ -19,7 +19,7 @@ import "./input-chip-DbIvSyvP.js";
19
19
  import "./code-preview-Z02-2suM.js";
20
20
  import "./payment-card-form-DLRNX9NX.js";
21
21
  import { SchmancyEvents as m } from "./types.js";
22
- import { n as A, e as L } from "./provide-tcktw8xB.js";
22
+ import { n as L, e as R } from "./provide-tcktw8xB.js";
23
23
  import { $ as j } from "./litElement.mixin-CzF0mNQd.js";
24
24
  import { c as u } from "./consume-5D1qfVWM.js";
25
25
  import "./date-range-kFnTrnHN.js";
@@ -40,7 +40,7 @@ import "./email-recipients-CPZlUiRR.js";
40
40
  import "./map-DeiCBxMP.js";
41
41
  import "./menu-wtkHGlyc.js";
42
42
  import { when as st } from "lit/directives/when.js";
43
- import "./navigation-rail-Bk9exaNK.js";
43
+ import "./navigation-rail-D-lK9oVd.js";
44
44
  import "./notification-service-ZiGUSd63.js";
45
45
  import "./option-BFlWiCu0.js";
46
46
  import "./progress-BYohUvYO.js";
@@ -52,7 +52,7 @@ import { s as it } from "./sheet.service-lXqUf6n5.js";
52
52
  import "./slider-D7qdxfvX.js";
53
53
  import "./schmancy-steps-container-BtAHCm73.js";
54
54
  import "./context-object-BE1o2XB3.js";
55
- import { tap as F, takeUntil as B, filter as V, throttleTime as qt, map as xt, pairwise as Tt, distinctUntilChanged as _t, take as Bt } from "rxjs/operators";
55
+ import { tap as q, takeUntil as N, filter as V, throttleTime as At, map as xt, pairwise as qt, distinctUntilChanged as _t, take as Bt } from "rxjs/operators";
56
56
  import "./surface-CKrYJ58l.js";
57
57
  import "./table-CP6_NkPm.js";
58
58
  import "./tabs-compatibility-7QKuXX4i.js";
@@ -191,7 +191,7 @@ const Ds = new class {
191
191
  push(t) {
192
192
  this.$drawer.next({ action: "push", ref: window, component: t });
193
193
  }
194
- }(), rt = A("push"), $t = A("close"), Ct = A(Math.floor(Math.random() * Date.now()).toString()), nt = A("100%"), at = A({});
194
+ }(), rt = L("push"), $t = L("close"), Ct = L(Math.floor(Math.random() * Date.now()).toString()), nt = L("100%"), at = L({});
195
195
  var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, P = (t, e, s, o) => {
196
196
  for (var n, i = o > 1 ? void 0 : o ? Yt(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
197
197
  return o && i && Kt(e, s, i), i;
@@ -208,7 +208,7 @@ let k = class extends j(w`
208
208
  super(...arguments), this.minWidth = { main: 360, sheet: 576 }, this.schmancyContentDrawerID = Math.floor(Math.random() * Date.now()).toString(), this.maxHeight = "100%";
209
209
  }
210
210
  firstUpdated() {
211
- Q(d(window, "resize"), d(window, m.ContentDrawerResize)).pipe(Ot(!0), v(() => this.clientWidth ? this.clientWidth : window.innerWidth), v((t) => t >= this.minWidth.main + this.minWidth.sheet), G(100), z(() => {
211
+ Q(d(window, "resize"), d(window, m.ContentDrawerResize)).pipe(Et(!0), v(() => this.clientWidth ? this.clientWidth : window.innerWidth), v((t) => t >= this.minWidth.main + this.minWidth.sheet), G(100), z(() => {
212
212
  this.maxHeight = window.innerHeight - this.getOffsetTop(this) - 32 + "px", this.style.setProperty("max-height", this.maxHeight);
213
213
  }), et(), y(this.disconnecting)).subscribe((t) => {
214
214
  t ? (this.mode = "push", this.open = "open") : (this.mode = "overlay", this.open = "close");
@@ -241,12 +241,12 @@ let k = class extends j(w`
241
241
  ` : ft;
242
242
  }
243
243
  };
244
- P([L({ context: at })], k.prototype, "minWidth", 2), P([L({ context: $t }), l()], k.prototype, "open", 2), P([L({ context: rt }), h()], k.prototype, "mode", 2), P([L({ context: Ct })], k.prototype, "schmancyContentDrawerID", 2), P([L({ context: nt })], k.prototype, "maxHeight", 2), P([gt({ flatten: !0 })], k.prototype, "assignedElements", 2), k = P([p("schmancy-content-drawer")], k);
245
- var Ft = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, q = (t, e, s, o) => {
244
+ P([R({ context: at })], k.prototype, "minWidth", 2), P([R({ context: $t }), l()], k.prototype, "open", 2), P([R({ context: rt }), h()], k.prototype, "mode", 2), P([R({ context: Ct })], k.prototype, "schmancyContentDrawerID", 2), P([R({ context: nt })], k.prototype, "maxHeight", 2), P([gt({ flatten: !0 })], k.prototype, "assignedElements", 2), k = P([p("schmancy-content-drawer")], k);
245
+ var Ft = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, _ = (t, e, s, o) => {
246
246
  for (var n, i = o > 1 ? void 0 : o ? Vt(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
247
247
  return o && i && Ft(e, s, i), i;
248
248
  };
249
- let R = class extends j(w`
249
+ let T = class extends j(w`
250
250
  :host {
251
251
  display: block;
252
252
  overflow: hidden;
@@ -279,7 +279,7 @@ let R = class extends j(w`
279
279
  `;
280
280
  }
281
281
  };
282
- q([l({ type: Number })], R.prototype, "minWidth", 2), q([u({ context: at, subscribe: !0 })], R.prototype, "drawerMinWidth", 2), q([u({ context: rt, subscribe: !0 }), h()], R.prototype, "mode", 2), q([u({ context: nt, subscribe: !0 }), h()], R.prototype, "maxHeight", 2), R = q([p("schmancy-content-drawer-main")], R);
282
+ _([l({ type: Number })], T.prototype, "minWidth", 2), _([u({ context: at, subscribe: !0 })], T.prototype, "drawerMinWidth", 2), _([u({ context: rt, subscribe: !0 }), h()], T.prototype, "mode", 2), _([u({ context: nt, subscribe: !0 }), h()], T.prototype, "maxHeight", 2), T = _([p("schmancy-content-drawer-main")], T);
283
283
  var Gt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, x = (t, e, s, o) => {
284
284
  for (var n, i = o > 1 ? void 0 : o ? Jt(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
285
285
  return o && i && Gt(e, s, i), i;
@@ -335,12 +335,12 @@ const Qt = new class {
335
335
  close(t) {
336
336
  this.$drawer.next({ self: t, state: !1 });
337
337
  }
338
- }(), Es = Qt, lt = A("push"), ct = A("close");
339
- var Zt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, X = (t, e, s, o) => {
338
+ }(), Os = Qt, lt = L("push"), ct = L("close");
339
+ var Zt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, U = (t, e, s, o) => {
340
340
  for (var n, i = o > 1 ? void 0 : o ? te(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
341
341
  return o && i && Zt(e, s, i), i;
342
342
  };
343
- let T = class extends Z(w`
343
+ let B = class extends Z(w`
344
344
  :host {
345
345
  display: block;
346
346
  }
@@ -369,7 +369,7 @@ let T = class extends Z(w`
369
369
  `;
370
370
  }
371
371
  };
372
- X([u({ context: lt, subscribe: !0 }), h()], T.prototype, "sidebarMode", 2), X([u({ context: ct, subscribe: !0 }), h()], T.prototype, "sidebarOpen", 2), X([l({ type: Boolean })], T.prototype, "toggler", 2), T = X([p("schmancy-nav-drawer-appbar")], T);
372
+ U([u({ context: lt, subscribe: !0 }), h()], B.prototype, "sidebarMode", 2), U([u({ context: ct, subscribe: !0 }), h()], B.prototype, "sidebarOpen", 2), U([l({ type: Boolean })], B.prototype, "toggler", 2), B = U([p("schmancy-nav-drawer-appbar")], B);
373
373
  var ee = Object.getOwnPropertyDescriptor;
374
374
  let yt = class extends j(w`
375
375
  :host {
@@ -392,7 +392,7 @@ yt = ((t, e, s, o) => {
392
392
  for (var n, i = o > 1 ? void 0 : o ? ee(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = n(i) || i);
393
393
  return i;
394
394
  })([p("schmancy-nav-drawer-content")], yt);
395
- var se = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, N = (t, e, s, o) => {
395
+ var se = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, A = (t, e, s, o) => {
396
396
  for (var n, i = o > 1 ? void 0 : o ? ie(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
397
397
  return o && i && se(e, s, i), i;
398
398
  };
@@ -433,19 +433,19 @@ let g = class extends j(w`
433
433
  flow="col"
434
434
  justify="stretch"
435
435
  align="stretch"
436
- ${Nt()}
436
+ ${Tt()}
437
437
  >
438
438
  <slot></slot>
439
439
  </schmancy-grid>
440
440
  ` : ft;
441
441
  }
442
442
  };
443
- g.BREAKPOINTS = { sm: 640, md: 768, lg: 1024, xl: 1280 }, N([l({ type: Boolean })], g.prototype, "fullscreen", 2), N([l({ type: String, attribute: "breakpoint" })], g.prototype, "breakpoint", 2), N([L({ context: lt }), h()], g.prototype, "mode", 2), N([L({ context: ct }), l()], g.prototype, "open", 2), N([h()], g.prototype, "_initialized", 2), g = N([p("schmancy-nav-drawer")], g);
443
+ g.BREAKPOINTS = { sm: 640, md: 768, lg: 1024, xl: 1280 }, A([l({ type: Boolean })], g.prototype, "fullscreen", 2), A([l({ type: String, attribute: "breakpoint" })], g.prototype, "breakpoint", 2), A([R({ context: lt }), h()], g.prototype, "mode", 2), A([R({ context: ct }), l()], g.prototype, "open", 2), A([h()], g.prototype, "_initialized", 2), g = A([p("schmancy-nav-drawer")], g);
444
444
  var oe = Object.defineProperty, re = Object.getOwnPropertyDescriptor, W = (t, e, s, o) => {
445
445
  for (var n, i = o > 1 ? void 0 : o ? re(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
446
446
  return o && i && oe(e, s, i), i;
447
447
  };
448
- const U = "cubic-bezier(0.5, 0.01, 0.25, 1)";
448
+ const K = "cubic-bezier(0.5, 0.01, 0.25, 1)";
449
449
  let D = class extends j() {
450
450
  constructor() {
451
451
  super(...arguments), this.width = "220px", this._initialized = !1;
@@ -457,20 +457,20 @@ let D = class extends j() {
457
457
  this._initialized && (t.has("drawerState") || t.has("mode")) && (this.mode === "overlay" ? this.drawerState === "open" ? this.nav.style.transform !== "translateX(0)" && (this.openOverlay(), this.showNavDrawer()) : this.drawerState === "close" && this.nav.style.transform !== "translateX(-100%)" && (this.hideNavDrawer(), this.closeOverlay()) : this.mode === "push" && (this.nav.style.transform !== "translateX(0)" && this.showNavDrawer(), this.overlay.style.display !== "none" && this.closeOverlay()));
458
458
  }
459
459
  openOverlay() {
460
- this.overlay.style.display = "block", this.overlay.animate([{ opacity: 0 }, { opacity: 0.4 }], { duration: 200, easing: U, fill: "forwards" });
460
+ this.overlay.style.display = "block", this.overlay.animate([{ opacity: 0 }, { opacity: 0.4 }], { duration: 200, easing: K, fill: "forwards" });
461
461
  }
462
462
  closeOverlay() {
463
- this.overlay.animate([{ opacity: 0.4 }, { opacity: 0 }], { duration: 150, easing: U, fill: "forwards" }).onfinish = () => {
463
+ this.overlay.animate([{ opacity: 0.4 }, { opacity: 0 }], { duration: 150, easing: K, fill: "forwards" }).onfinish = () => {
464
464
  this.overlay.style.display = "none";
465
465
  };
466
466
  }
467
467
  showNavDrawer() {
468
- this.nav.animate([{ transform: "translateX(-100%)" }, { transform: "translateX(0)" }], { duration: 200, easing: U, fill: "forwards" }).onfinish = () => {
468
+ this.nav.animate([{ transform: "translateX(-100%)" }, { transform: "translateX(0)" }], { duration: 200, easing: K, fill: "forwards" }).onfinish = () => {
469
469
  this.nav.style.transform = "translateX(0)";
470
470
  };
471
471
  }
472
472
  hideNavDrawer() {
473
- this.nav.animate([{ transform: "translateX(0)" }, { transform: "translateX(-100%)" }], { duration: 200, easing: U, fill: "forwards" }).onfinish = () => {
473
+ this.nav.animate([{ transform: "translateX(0)" }, { transform: "translateX(-100%)" }], { duration: 200, easing: K, fill: "forwards" }).onfinish = () => {
474
474
  this.nav.style.transform = "translateX(-100%)";
475
475
  };
476
476
  }
@@ -497,7 +497,7 @@ let D = class extends j() {
497
497
  }
498
498
  };
499
499
  W([u({ context: lt, subscribe: !0 }), h()], D.prototype, "mode", 2), W([u({ context: ct, subscribe: !0 }), h()], D.prototype, "drawerState", 2), W([tt("#overlay")], D.prototype, "overlay", 2), W([tt("nav")], D.prototype, "nav", 2), W([l({ type: String })], D.prototype, "width", 2), W([h()], D.prototype, "_initialized", 2), D = W([p("schmancy-nav-drawer-navbar")], D);
500
- var ne = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, E = (t, e, s, o) => {
500
+ var ne = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, O = (t, e, s, o) => {
501
501
  for (var n, i = o > 1 ? void 0 : o ? ae(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
502
502
  return o && i && ne(e, s, i), i;
503
503
  };
@@ -561,9 +561,9 @@ let $ = class extends Z(w`
561
561
  const e = this.shadowRoot?.querySelector(".w-16.h-8");
562
562
  if (e) {
563
563
  const s = e.getBoundingClientRect(), o = { x: t.clientX - s.left, y: t.clientY - s.top, id: Date.now() };
564
- this.ripples = [...this.ripples, o], zt(600).pipe(F(() => {
564
+ this.ripples = [...this.ripples, o], zt(600).pipe(q(() => {
565
565
  this.ripples = this.ripples.filter((n) => n.id !== o.id);
566
- }), B(this.disconnecting)).subscribe();
566
+ }), N(this.disconnecting)).subscribe();
567
567
  }
568
568
  }, this.handleClick = (t) => {
569
569
  if (this.disabled) return t.preventDefault(), void t.stopPropagation();
@@ -582,17 +582,17 @@ let $ = class extends Z(w`
582
582
  this.active = t;
583
583
  }
584
584
  connectedCallback() {
585
- super.connectedCallback(), this.active$.pipe(B(this.disconnecting)).subscribe(() => {
585
+ super.connectedCallback(), this.active$.pipe(N(this.disconnecting)).subscribe(() => {
586
586
  this.requestUpdate();
587
587
  }), this.setupNavigationStream();
588
588
  }
589
589
  setupNavigationStream() {
590
590
  const t = this.shadowRoot?.querySelector("button");
591
591
  if (!t) return;
592
- const e = d(t, "click").pipe(V(() => !this.disabled)), s = d(t, "keydown").pipe(V(() => !this.disabled), V((o) => o.key === "Enter" || o.key === " "), F((o) => o.preventDefault()));
593
- Q(e, s).pipe(F(() => {
592
+ const e = d(t, "click").pipe(V(() => !this.disabled)), s = d(t, "keydown").pipe(V(() => !this.disabled), V((o) => o.key === "Enter" || o.key === " "), q((o) => o.preventDefault()));
593
+ Q(e, s).pipe(q(() => {
594
594
  this.dispatchEvent(new CustomEvent("bar-item-click", { detail: { icon: this.icon, label: this.label, active: this.active }, bubbles: !0, composed: !0 }));
595
- }), B(this.disconnecting)).subscribe();
595
+ }), N(this.disconnecting)).subscribe();
596
596
  }
597
597
  formatBadge(t) {
598
598
  const e = Number(t);
@@ -602,7 +602,7 @@ let $ = class extends Z(w`
602
602
  this.setupNavigationStream();
603
603
  }
604
604
  render() {
605
- const t = this.querySelector("[slot]") || this.textContent?.trim() && !this.label, e = this.badge ? this.formatBadge(this.badge) : "", s = e && e !== "0", o = this.querySelector('[slot="icon"]'), n = { "relative flex flex-col items-center justify-center": !0, "flex-1 min-w-[48px] max-w-[168px]": !0, "py-2 px-1 cursor-pointer": !this.disabled, "transition-all duration-200": !0, "hover:bg-surface-container-high": !this.disabled && !this.active, "cursor-not-allowed opacity-38": this.disabled, "outline-none": !0, "focus-visible:outline-2 focus-visible:outline-offset-2": !0 }, i = { "w-16 h-8 rounded-2xl": !0, "flex items-center justify-center": !0, "transition-all duration-200": !0, "bg-secondary-container": this.active, "group-hover:bg-surface-container-highest": !this.active && !this.disabled, "relative overflow-hidden": !0 }, a = { "absolute top-0 right-3": !0, "min-w-[6px] h-1.5": !s, "min-w-[16px] h-4": s, "rounded-full": !s, "rounded-lg": s, "flex items-center justify-center": s, "px-1": s, "transition-all duration-200": !0, "z-10": !0 }, Dt = this.active ? { color: r.sys.color.secondary.onContainer } : { color: r.sys.color.surface.onVariant }, Et = { "--focus-color": r.sys.color.primary.default };
605
+ const t = this.querySelector("[slot]") || this.textContent?.trim() && !this.label, e = this.badge ? this.formatBadge(this.badge) : "", s = e && e !== "0", o = this.querySelector('[slot="icon"]'), n = { "relative flex flex-col items-center justify-center": !0, "flex-1 min-w-[48px] max-w-[168px]": !0, "py-2 px-1 cursor-pointer": !this.disabled, "transition-all duration-200": !0, "hover:bg-surface-container-high": !this.disabled && !this.active, "cursor-not-allowed opacity-38": this.disabled, "outline-none": !0, "focus-visible:outline-2 focus-visible:outline-offset-2": !0 }, i = { "w-16 h-8 rounded-2xl": !0, "flex items-center justify-center": !0, "transition-all duration-200": !0, "bg-secondary-container": this.active, "group-hover:bg-surface-container-highest": !this.active && !this.disabled, "relative overflow-hidden": !0 }, a = { "absolute top-0 right-3": !0, "min-w-[6px] h-1.5": !s, "min-w-[16px] h-4": s, "rounded-full": !s, "rounded-lg": s, "flex items-center justify-center": s, "px-1": s, "transition-all duration-200": !0, "z-10": !0 }, Dt = this.active ? { color: r.sys.color.secondary.onContainer } : { color: r.sys.color.surface.onVariant }, Ot = { "--focus-color": r.sys.color.primary.default };
606
606
  return c`
607
607
  <button
608
608
  type="button"
@@ -612,7 +612,7 @@ let $ = class extends Z(w`
612
612
  ?disabled=${this.disabled}
613
613
  aria-pressed=${this.active}
614
614
  aria-label=${this.label || "Navigation item"}
615
- style=${this.styleMap({ ...Et, "outline-color": "var(--focus-color)" })}
615
+ style=${this.styleMap({ ...Ot, "outline-color": "var(--focus-color)" })}
616
616
  ${M(Dt)}
617
617
  >
618
618
  <!-- Icon with indicator background -->
@@ -662,12 +662,12 @@ let $ = class extends Z(w`
662
662
  `;
663
663
  }
664
664
  };
665
- E([l({ type: String })], $.prototype, "icon", 2), E([l({ type: String })], $.prototype, "label", 2), E([l({ type: String })], $.prototype, "badge", 2), E([l({ type: Boolean, reflect: !0 })], $.prototype, "active", 1), E([l({ type: Boolean, reflect: !0 })], $.prototype, "disabled", 2), E([l({ type: Boolean, reflect: !0 })], $.prototype, "hideLabels", 2), E([h()], $.prototype, "ripples", 2), $ = E([p("schmancy-navigation-bar-item")], $);
665
+ O([l({ type: String })], $.prototype, "icon", 2), O([l({ type: String })], $.prototype, "label", 2), O([l({ type: String })], $.prototype, "badge", 2), O([l({ type: Boolean, reflect: !0 })], $.prototype, "active", 1), O([l({ type: Boolean, reflect: !0 })], $.prototype, "disabled", 2), O([l({ type: Boolean, reflect: !0 })], $.prototype, "hideLabels", 2), O([h()], $.prototype, "ripples", 2), $ = O([p("schmancy-navigation-bar-item")], $);
666
666
  var le = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, H = (t, e, s, o) => {
667
667
  for (var n, i = o > 1 ? void 0 : o ? ce(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
668
668
  return o && i && le(e, s, i), i;
669
669
  };
670
- let O = class extends Z(w`
670
+ let E = class extends Z(w`
671
671
  :host {
672
672
  display: block;
673
673
  position: fixed;
@@ -696,13 +696,13 @@ let O = class extends Z(w`
696
696
  `) {
697
697
  constructor() {
698
698
  super(...arguments), this.activeIndex$ = new vt(-1), this.hideLabels = !1, this.elevation = 2, this.hideOnScroll = !1, this.focusedIndex = -1, this.isHidden = !1, this.SCROLL_THRESHOLD = 10, this.handleItemClick = (t) => {
699
- const e = this.querySelectorAll("schmancy-navigation-bar-item"), s = t.target, o = Array.from(e).indexOf(s);
699
+ const e = this.getItems(), s = t.target, o = e.indexOf(s);
700
700
  if (o !== -1 && this.activeIndex !== o) {
701
701
  const n = this.activeIndex;
702
702
  this.activeIndex = o, this.dispatchEvent(new CustomEvent("navigation-change", { detail: { oldIndex: n, newIndex: o, item: s }, bubbles: !0, composed: !0 }));
703
703
  }
704
704
  }, this.handleKeyDown = (t) => {
705
- const e = Array.from(this.querySelectorAll("schmancy-navigation-bar-item")), s = this.focusedIndex === -1 ? this.activeIndex : this.focusedIndex;
705
+ const e = this.getItems(), s = this.focusedIndex === -1 ? this.activeIndex : this.focusedIndex;
706
706
  switch (t.key) {
707
707
  case "ArrowLeft":
708
708
  t.preventDefault(), s > 0 && this.focusItem(s - 1);
@@ -728,22 +728,23 @@ let O = class extends Z(w`
728
728
  set activeIndex(t) {
729
729
  this.activeIndex$.next(t);
730
730
  }
731
+ getItems() {
732
+ const t = this.shadowRoot?.querySelector("slot");
733
+ return t ? t.assignedElements({ flatten: !0 }).filter((e) => e.tagName.toLowerCase() === "schmancy-navigation-bar-item") : [];
734
+ }
731
735
  connectedCallback() {
732
- super.connectedCallback(), this.addEventListener("bar-item-click", this.handleItemClick), this.addEventListener("keydown", this.handleKeyDown), this.activeIndex$.pipe(B(this.disconnecting)).subscribe((t) => {
736
+ super.connectedCallback(), d(this, "bar-item-click").pipe(q((t) => this.handleItemClick(t)), N(this.disconnecting)).subscribe(), d(this, "keydown").pipe(q((t) => this.handleKeyDown(t)), N(this.disconnecting)).subscribe(), this.activeIndex$.pipe(N(this.disconnecting)).subscribe((t) => {
733
737
  this.updateActiveStates(t);
734
738
  }), this.hideOnScroll && this.setupScrollListener(), this.updateItems();
735
739
  }
736
740
  setupScrollListener() {
737
- d(window, "scroll").pipe(qt(100), xt(() => window.scrollY), Tt(), V(([t, e]) => Math.abs(e - t) > this.SCROLL_THRESHOLD), F(([t, e]) => {
741
+ d(window, "scroll").pipe(At(100), xt(() => window.scrollY), qt(), V(([t, e]) => Math.abs(e - t) > this.SCROLL_THRESHOLD), q(([t, e]) => {
738
742
  const s = e < t;
739
743
  e > t && !this.isHidden ? this.isHidden = !0 : s && this.isHidden && (this.isHidden = !1), e <= this.SCROLL_THRESHOLD && (this.isHidden = !1);
740
- }), B(this.disconnecting)).subscribe();
741
- }
742
- disconnectedCallback() {
743
- this.removeEventListener("bar-item-click", this.handleItemClick), this.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
744
+ }), N(this.disconnecting)).subscribe();
744
745
  }
745
746
  focusItem(t) {
746
- const e = this.querySelectorAll("schmancy-navigation-bar-item");
747
+ const e = this.getItems();
747
748
  e[t] && (this.focusedIndex = t, e[t].focus());
748
749
  }
749
750
  updateItems() {
@@ -756,7 +757,7 @@ let O = class extends Z(w`
756
757
  }
757
758
  }
758
759
  updateActiveStates(t) {
759
- this.querySelectorAll("schmancy-navigation-bar-item").forEach((e, s) => {
760
+ this.getItems().forEach((e, s) => {
760
761
  const o = e;
761
762
  o.setActive ? o.setActive(s === t) : o.active = s === t, o.hideLabels = this.hideLabels, e.tabIndex = s === t ? 0 : -1;
762
763
  });
@@ -780,8 +781,8 @@ let O = class extends Z(w`
780
781
  `;
781
782
  }
782
783
  };
783
- H([l({ type: Number })], O.prototype, "activeIndex", 1), H([l({ type: Boolean, reflect: !0 })], O.prototype, "hideLabels", 2), H([l({ type: Number, reflect: !0 })], O.prototype, "elevation", 2), H([l({ type: Boolean, reflect: !0 })], O.prototype, "hideOnScroll", 2), H([h()], O.prototype, "focusedIndex", 2), H([h()], O.prototype, "isHidden", 2), O = H([p("schmancy-navigation-bar")], O);
784
- const St = "whereAreYouRicky", kt = "hereMorty", K = new class {
784
+ H([l({ type: Number })], E.prototype, "activeIndex", 1), H([l({ type: Boolean, reflect: !0 })], E.prototype, "hideLabels", 2), H([l({ type: Number, reflect: !0 })], E.prototype, "elevation", 2), H([l({ type: Boolean, reflect: !0 })], E.prototype, "hideOnScroll", 2), H([h()], E.prototype, "focusedIndex", 2), H([h()], E.prototype, "isHidden", 2), E = H([p("schmancy-navigation-bar")], E);
785
+ const St = "whereAreYouRicky", kt = "hereMorty", Y = new class {
785
786
  constructor() {
786
787
  this.activeTeleportations = /* @__PURE__ */ new Map(), this.flipRequests = new ot(), this.find = (t) => pt([d(window, kt).pipe(wt((e) => !!e.detail.component.uuid && !!t.id && e.detail.component.id === t.id && e.detail.component.uuid !== t.uuid), v((e) => e.detail.component), Mt(1)), J(t).pipe(z(() => {
787
788
  window.dispatchEvent(new CustomEvent(St, { detail: { id: t.id, callerID: t.uuid } }));
@@ -798,11 +799,11 @@ const St = "whereAreYouRicky", kt = "hereMorty", K = new class {
798
799
  function bt(t) {
799
800
  return Ht(50).pipe(xt(() => t.getBoundingClientRect()), _t((e, s) => e.width === s.width && e.height === s.height && e.top === s.top && e.right === s.right && e.bottom === s.bottom && e.left === s.left), Bt(1));
800
801
  }
801
- var he = Object.defineProperty, de = Object.getOwnPropertyDescriptor, Y = (t, e, s, o) => {
802
+ var he = Object.defineProperty, de = Object.getOwnPropertyDescriptor, F = (t, e, s, o) => {
802
803
  for (var n, i = o > 1 ? void 0 : o ? de(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
803
804
  return o && i && he(e, s, i), i;
804
805
  };
805
- let _ = class extends j(w``) {
806
+ let X = class extends j(w``) {
806
807
  constructor() {
807
808
  super(...arguments), this.uuid = Math.floor(Math.random() * Date.now()), this.delay = 0, this.debugging = !1;
808
809
  }
@@ -811,20 +812,20 @@ let _ = class extends j(w``) {
811
812
  }
812
813
  connectedCallback() {
813
814
  if (this.id === void 0) throw new Error("id is required");
814
- super.connectedCallback(), Q(d(window, At).pipe(z({ next: () => {
815
- this.dispatchEvent(new CustomEvent(Rt, { detail: { component: this }, bubbles: !0, composed: !0 }));
815
+ super.connectedCallback(), Q(d(window, Nt).pipe(z({ next: () => {
816
+ this.dispatchEvent(new CustomEvent(Lt, { detail: { component: this }, bubbles: !0, composed: !0 }));
816
817
  } })), d(window, St).pipe(z({ next: (t) => {
817
818
  t.detail.id === this.id && this.uuid && t.detail.callerID !== this.uuid && this.dispatchEvent(new CustomEvent(kt, { detail: { component: this }, bubbles: !0, composed: !0 }));
818
819
  } }))).pipe(y(this.disconnecting)).subscribe();
819
820
  }
820
821
  async firstUpdated() {
821
- J(K.activeTeleportations.get(this.id)).pipe(wt((t) => !!t), y(this.disconnecting), Lt()).subscribe({ next: (t) => {
822
+ J(Y.activeTeleportations.get(this.id)).pipe(wt((t) => !!t), y(this.disconnecting), Rt()).subscribe({ next: (t) => {
822
823
  this.style.setProperty("visibility", "hidden"), bt(this).pipe(y(this.disconnecting)).subscribe({ next: (e) => {
823
- K.activeTeleportations.set(this.id, e), K.flipRequests.next({ from: { rect: t }, to: { rect: e, element: this._slottedChildren[0] }, host: this });
824
+ Y.activeTeleportations.set(this.id, e), Y.flipRequests.next({ from: { rect: t }, to: { rect: e, element: this._slottedChildren[0] }, host: this });
824
825
  } });
825
826
  }, error: () => {
826
827
  this.style.setProperty("visibility", "visible"), bt(this).pipe(y(this.disconnecting)).subscribe({ next: (t) => {
827
- K.activeTeleportations.set(this.id, t);
828
+ Y.activeTeleportations.set(this.id, t);
828
829
  } });
829
830
  }, complete: () => {
830
831
  } });
@@ -833,7 +834,7 @@ let _ = class extends j(w``) {
833
834
  return c`<slot></slot>`;
834
835
  }
835
836
  };
836
- Y([l({ type: Number, reflect: !0 })], _.prototype, "uuid", 2), Y([l({ type: String })], _.prototype, "id", 2), Y([l({ type: Number })], _.prototype, "delay", 2), _ = Y([p("schmancy-teleport")], _);
837
+ F([l({ type: Number, reflect: !0 })], X.prototype, "uuid", 2), F([l({ type: String })], X.prototype, "id", 2), F([l({ type: Number })], X.prototype, "delay", 2), X = F([p("schmancy-teleport")], X);
837
838
  var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, C = (t, e, s, o) => {
838
839
  for (var n, i = o > 1 ? void 0 : o ? ue(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
839
840
  return o && i && pe(e, s, i), i;
@@ -865,7 +866,7 @@ let f = class extends j() {
865
866
  };
866
867
  C([l({ type: String })], f.prototype, "initials", 2), C([l({ type: String })], f.prototype, "src", 2), C([l({ type: String })], f.prototype, "icon", 2), C([l({ type: String })], f.prototype, "size", 2), C([l({ type: String })], f.prototype, "color", 2), C([l({ type: String })], f.prototype, "shape", 2), C([l({ type: Boolean })], f.prototype, "bordered", 2), C([l({ type: String })], f.prototype, "status", 2), f = C([p("schmancy-avatar")], f);
867
868
  export {
868
- Es as $,
869
+ Os as $,
869
870
  kt as H,
870
871
  S,
871
872
  St as W,
@@ -876,20 +877,20 @@ export {
876
877
  nt as e,
877
878
  at as f,
878
879
  k as g,
879
- R as h,
880
+ T as h,
880
881
  b as i,
881
882
  Qt as j,
882
- T as k,
883
+ B as k,
883
884
  yt as l,
884
885
  lt as m,
885
886
  ct as n,
886
887
  g as o,
887
888
  D as p,
888
889
  $ as q,
889
- O as r,
890
+ E as r,
890
891
  Ds as s,
891
- _ as t,
892
- K as u,
892
+ X as t,
893
+ Y as u,
893
894
  f as v
894
895
  };
895
- //# sourceMappingURL=avatar-D2FqPXk4.js.map
896
+ //# sourceMappingURL=avatar-CjjwZDsw.js.map