@nextrap/nte-nav 1.1.13 → 1.1.15
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.
- package/CHANGELOG.md +8 -0
- package/components/nte-nav-brand-relocator/nte-nav-brand-relocator.d.ts +32 -0
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.js +197 -100
- package/lib/nte-nav.d.ts +5 -5
- package/lib/nte-navbar.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 1.1.15 (2025-09-11)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 1.1.14 (2025-08-28)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
1
9
|
## 1.1.13 (2025-08-28)
|
|
2
10
|
|
|
3
11
|
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
declare const NteNavBrandRelocator_base: (abstract new (...a: any[]) => {
|
|
3
|
+
"__#2023@#ac"?: AbortController;
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
disconnectedCallback(): void;
|
|
6
|
+
"__#2023@#bindEventListeners"(): void;
|
|
7
|
+
}) & (abstract new (...args: any[]) => {
|
|
8
|
+
"__#2024@#debugCached": boolean | null;
|
|
9
|
+
"__#2024@#myElementId": number;
|
|
10
|
+
invalidateDebugCache(): void;
|
|
11
|
+
"__#2024@#myLoggerInstance": import('@trunkjs/browser-utils').Logger | null;
|
|
12
|
+
readonly _debug: boolean;
|
|
13
|
+
getLogger(instanceId?: string): import('@trunkjs/browser-utils').Logger;
|
|
14
|
+
log(...args: any[]): void;
|
|
15
|
+
warn(...args: any[]): void;
|
|
16
|
+
error(...args: any[]): void;
|
|
17
|
+
throwError(...args: any[]): never;
|
|
18
|
+
}) & typeof LitElement;
|
|
19
|
+
export declare class NteNavBrandRelocator extends NteNavBrandRelocator_base {
|
|
20
|
+
#private;
|
|
21
|
+
static styles: import('lit').CSSResult[];
|
|
22
|
+
accessor brandSelector: string;
|
|
23
|
+
accessor active: boolean | null;
|
|
24
|
+
accessor mode: string;
|
|
25
|
+
private accessor done;
|
|
26
|
+
private onScroll;
|
|
27
|
+
private onanimationEnd;
|
|
28
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
29
|
+
update(changedProperties: Map<string, any>): void;
|
|
30
|
+
firstUpdated(): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
package/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.nav-vertical{width:100%}.nav-vertical ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;width:100%;gap:.15rem;position:relative}.nav-vertical ul>li{position:relative;display:block}.nav-vertical ul>li>a{display:block;padding:.65em 1.1em;color:var(--text-color);text-decoration:none;transition:background var(--transition),color var(--transition);font-weight:500}.nav-vertical ul>li>a.active,.nav-vertical ul>li>a:active{background-color:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:hover{background-color:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:after{content:"";display:inline-block;margin-left:.47em;margin-bottom:.08em;border:solid currentColor;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg) scale(.8);opacity:0;transition:opacity var(--transition),transform var(--transition)}.nav-vertical ul>li:has(ul)>a:after{opacity:.55}.nav-vertical ul>li:active>a:after,.nav-vertical ul>li:focus-within>a:after{transform:rotate(135deg) scale(.85)}.nav-vertical ul>li:focus-within>ul{display:flex}.nav-vertical ul>li>ul{list-style:none;margin:0;padding:0 0 0 .7em;display:none;flex-direction:column}li>.nav-vertical ul>li>ul,.nav-vertical ul>li>ul:focus-within{display:flex}.nav-vertical ul>li>ul>li>a{padding:.55em 1.1em;font-size:.95em;font-weight:400;color:var(--text-color);transition:background var(--transition),color var(--transition)}.nav-vertical ul>li>ul>li>a:hover{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal
|
|
1
|
+
@charset "UTF-8";.nav-vertical{width:100%}.nav-vertical ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;width:100%;gap:.15rem;position:relative}.nav-vertical ul>li{position:relative;display:block}.nav-vertical ul>li>a{display:block;padding:.65em 1.1em;color:var(--text-color);text-decoration:none;transition:background var(--transition),color var(--transition);font-weight:500}.nav-vertical ul>li>a.active,.nav-vertical ul>li>a:active{background-color:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:hover{background-color:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:after{content:"";display:inline-block;margin-left:.47em;margin-bottom:.08em;border:solid currentColor;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg) scale(.8);opacity:0;transition:opacity var(--transition),transform var(--transition)}.nav-vertical ul>li:has(ul)>a:after{opacity:.55}.nav-vertical ul>li:active>a:after,.nav-vertical ul>li:focus-within>a:after{transform:rotate(135deg) scale(.85)}.nav-vertical ul>li:focus-within>ul{display:flex}.nav-vertical ul>li>ul{list-style:none;margin:0;padding:0 0 0 .7em;display:none;flex-direction:column}li>.nav-vertical ul>li>ul,.nav-vertical ul>li>ul:focus-within{display:flex}.nav-vertical ul>li>ul>li>a{padding:.55em 1.1em;font-size:.95em;font-weight:400;color:var(--text-color);transition:background var(--transition),color var(--transition)}.nav-vertical ul>li>ul>li>a:hover{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal.pos-start{--justify-content: flex-start}.nav-horizontal.pos-end{--justify-content: flex-end}.nav-horizontal.pos-center{--justify-content: center}.nav-horizontal.pos-stretch>ul{display:flex}.nav-horizontal.pos-stretch>ul>li{flex-grow:1}.nav-horizontal.pos-stretch>ul>li>a{width:100%;justify-content:center}.nav-horizontal{--item-padding: .65em 1.1em;--padding: 0}.nav-horizontal.size-sm{--item-padding: 2px 15px;--item-margin: 2px .2em;--font-size: .6rem}.nav-horizontal.style-pills{--pill-background: rgba(var(--nt-primary-rgb), .8);--pill-radius: .5em;--pill-text-color: var(--nt-text-on-primary);--pill-hover-background: rgba(var(--nt-primary-rgb), 1)}.nav-horizontal.style-pills>ul>li>a{background:var(--pill-background);border-radius:var(--pill-radius);--text-color: var(--pill-text-color);transition:background var(--transition),color var(--transition)}.nav-horizontal.style-pills>ul>li>a:hover,.nav-horizontal.style-pills>ul>li>a:focus{background:var(--pill-hover-background);--font-color: var(--pill-text-color)}.nav-horizontal.style-pills>ul>li>a.active,.nav-horizontal.style-pills>ul>li>a:active{background:var(--pill-hover-background);--font-color: var(--pill-text-color)}.nav-horizontal.style-undecorated{--item-padding: .65em 1.1em;--item-margin: 0;--text-color: var(--nt-text);--hover-color: transparent;--submenu-hover-color: var(--nt-primary);--hover-text-color: var(--nt-text);--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text)}.nav-horizontal.style-undecorated a,.nav-horizontal.style-undecorated a>*{color:rgb(from var(--text-color) r g b/var(--default-alpha));transition:color var(--transition)}.nav-horizontal.style-undecorated a:hover,.nav-horizontal.style-undecorated a:hover>*{color:rgb(from var(--text-color) r g b/1)}.nav-horizontal ul{list-style:none;padding:var(--padding);margin:0;display:flex;flex-direction:row;align-items:center;position:relative;height:100%;justify-content:var(--justify-content)}.nav-horizontal ul>li,.nav-horizontal ul li{position:relative;display:flex;align-items:center;height:inherit}.nav-horizontal ul>li>a,.nav-horizontal ul li>a{display:flex;align-items:center;margin:var(--item-margin, 0);height:100%;padding:var(--item-padding);gap:.5em;text-decoration:none;color:var(--text-color);transition:background var(--transition),color var(--transition);font-weight:500}.nav-horizontal ul>li>a.active,.nav-horizontal ul>li>a:active,.nav-horizontal ul li>a.active,.nav-horizontal ul li>a:active{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li>a:hover,li:hover>.nav-horizontal ul>li>a,.nav-horizontal ul li>a:hover,li:hover>.nav-horizontal ul li>a{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li>a:after,.nav-horizontal ul li>a:after{content:"";display:none;margin-left:.47em;margin-bottom:.08em;border:solid currentColor;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg) scale(.8);opacity:0;transition:opacity var(--transition),transform var(--transition)}.nav-horizontal ul>li:has(ul)>a:after,.nav-horizontal ul li:has(ul)>a:after{opacity:.55;display:inline-block}.nav-horizontal ul>li:active>a:after,.nav-horizontal ul>li:focus-within>a:after,.nav-horizontal ul li:active>a:after,.nav-horizontal ul li:focus-within>a:after{transform:rotate(-135deg) scale(.85)}.nav-horizontal ul>li>ul,.nav-horizontal ul li>ul{display:block;visibility:hidden;opacity:0;pointer-events:none;min-width:11rem;background:var(--submenu-bg)!important;position:absolute;top:100%;left:0}.nav-horizontal ul>li>ul:last-child,.nav-horizontal ul li>ul:last-child{right:0;left:auto}.nav-horizontal ul>li>ul,.nav-horizontal ul li>ul{margin-top:.3em;flex-direction:column;z-index:3;transition:opacity var(--transition),transform var(--transition),visibility var(--transition);transform:translateY(-.7em)}.nav-horizontal ul>li>ul:hover,.nav-horizontal ul>li>ul:focus-within,.nav-horizontal ul li>ul:hover,.nav-horizontal ul li>ul:focus-within{visibility:visible;opacity:1;pointer-events:all;transform:translateY(0)}.nav-horizontal ul>li>ul>li,.nav-horizontal ul li>ul>li{display:flex;height:auto;background:var(--submenu-bg)}.nav-horizontal ul>li>ul>li>a,.nav-horizontal ul li>ul>li>a{display:block;width:100%;color:var(--text-color);padding:.63em 1.3em;font-size:.99em;font-weight:400;height:auto;transition:background var(--transition),color var(--transition)}.nav-horizontal ul>li>ul>li>a:hover,.nav-horizontal ul li>ul>li>a:hover{background:var(--submenu-hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li:focus-within>ul,.nav-horizontal ul li:focus-within>ul{visibility:visible;opacity:1;pointer-events:all;transform:translateY(0)}nte-navbar.is-scrolled{--bg: rgb(from var(--nt-white) r g b / 1)}nte-navbar.autoborder{--border-color: var(--nt-light)}nte-navbar.autoborder.is-scrolled::part(navbar){border-bottom:1px solid rgb(from var(--border-color) r g b/.1)}nte-navbar.autoshadow{--shadow-color: var(--nt-dark);--shadow: 0 2px 4px rgb(from var(--shadow-color) r g b / .1)}nte-navbar.autoshadow::part(navbar){transition:box-shadow .5s ease-in-out}nte-navbar.autoshadow.is-scrolled::part(navbar){box-shadow:var(--shadow)}nte-navbar.fixed::part(navbar){position:fixed;top:0;left:0;opacity:1;width:100%}nte-navbar.autohide::part(navbar){transition:transform .3s ease-in-out}nte-navbar.autohide.state-pre-scrolled.state-scrolling-down::part(navbar){transform:translateY(-100%)}nte-navbar.autohide.state-pre-scrolled.state-scrolling-up::part(navbar){transform:translateY(0);position:fixed;top:0;left:0;opacity:1;width:100%}nte-navbar.autohide.state-scrolled::part(navbar){position:fixed;top:0;left:0;opacity:1;width:100%;transform:translateY(-100%)}nte-navbar.autohide.state-scrolled.state-scrolling-up::part(navbar){transform:translateY(0);position:fixed;top:0;left:0;opacity:1;width:100%}nte-navbar-line [slot=brand]{height:100%;width:100%;display:flex;align-items:center}nte-navbar-line [slot=brand] img{height:var(--brand-height);max-height:100%;max-width:100%;width:auto;object-fit:contain}nte-navbar-line [slot=brand] a,nte-navbar-line [slot=brand] div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-decoration:none;width:100%}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
var O = (r, e, t) => e in r ? P(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
-
var n = (r, e, t) => O(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { waitForDomContentLoaded as u, isBiggerThanBreakpoint as m, Debouncer as $, SlotTool as x } from "@nextrap/nt-framework";
|
|
1
|
+
import { waitForDomContentLoaded as q, isBiggerThanBreakpoint as wt, Debouncer as ie, SlotTool as Tt } from "@nextrap/nt-framework";
|
|
5
2
|
import "@nextrap/nte-offcanvas";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { createRef as
|
|
3
|
+
import { html as T, unsafeCSS as H, LitElement as j } from "lit";
|
|
4
|
+
import { customElement as J, property as O, state as zt } from "lit/decorators.js";
|
|
5
|
+
import { createRef as mt, ref as yt } from "lit/directives/ref.js";
|
|
6
|
+
import { EventBindingsMixin as ae, LoggingMixin as oe, Listen as ne } from "@trunkjs/browser-utils";
|
|
7
|
+
import { styleMap as se } from "lit/directives/style-map.js";
|
|
9
8
|
import "@nextrap/nte-burger";
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
const le = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--justify-content: center;--sidemenu-bg: var(--nt-primary-subtle);--justify-sidebar-burger: flex-end;--height: auto;--default-alpha: .7;height:var(--height);display:block}nav{height:100%}#main{height:100%}#burger-wrapper{padding:15px}#text{padding-right:10px}#burger-default{cursor:pointer}#burger-default slot::slotted(span){color:rgb(from var(--text-color) r g b/var(--default-alpha));transition:color var(--transition)}#burger-default nte-burger{--color: rgb(from var(--text-color) r g b / var(--default-alpha))}#burger-default:hover slot::slotted(span){color:rgb(from var(--text-color) r g b/1)}#burger-default:hover nte-burger{--color: rgb(from var(--text-color) r g b / 1)}";
|
|
10
|
+
var de = Object.create, tt = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, Ct = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), C = (t) => {
|
|
11
|
+
throw TypeError(t);
|
|
12
|
+
}, he = (t, e, r) => e in t ? tt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, St = (t, e) => tt(t, "name", { value: e, configurable: !0 }), pe = (t) => [, , , de((t == null ? void 0 : t[Ct("metadata")]) ?? null)], Pt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], D = (t) => t !== void 0 && typeof t != "function" ? C("Function expected") : t, ve = (t, e, r, n, a) => ({ kind: Pt[t], name: e, metadata: n, addInitializer: (o) => r._ ? C("Already initialized") : a.push(D(o || null)) }), ue = (t, e) => he(e, Ct("metadata"), t[3]), y = (t, e, r, n) => {
|
|
13
|
+
for (var a = 0, o = t[e >> 1], h = o && o.length; a < h; a++) e & 1 ? o[a].call(r) : n = o[a].call(r, n);
|
|
14
|
+
return n;
|
|
15
|
+
}, P = (t, e, r, n, a, o) => {
|
|
16
|
+
var h, s, b, p, f, i = e & 7, g = !!(e & 8), d = !!(e & 16), _ = i > 3 ? t.length + 1 : i ? g ? 1 : 2 : 0, k = Pt[i + 5], N = i > 3 && (t[_ - 1] = []), W = t[_] || (t[_] = []), c = i && (!d && !g && (a = a.prototype), i < 5 && (i > 3 || !d) && ce(i < 4 ? a : { get [r]() {
|
|
17
|
+
return $t(this, o);
|
|
18
|
+
}, set [r](l) {
|
|
19
|
+
return xt(this, o, l);
|
|
20
|
+
} }, r));
|
|
21
|
+
i ? d && i < 4 && St(o, (i > 2 ? "set " : i > 1 ? "get " : "") + r) : St(a, r);
|
|
22
|
+
for (var w = n.length - 1; w >= 0; w--)
|
|
23
|
+
p = ve(i, r, b = {}, t[3], W), i && (p.static = g, p.private = d, f = p.access = { has: d ? (l) => _e(a, l) : (l) => r in l }, i ^ 3 && (f.get = d ? (l) => (i ^ 1 ? $t : fe)(l, a, i ^ 4 ? o : c.get) : (l) => l[r]), i > 2 && (f.set = d ? (l, m) => xt(l, a, m, i ^ 4 ? o : c.set) : (l, m) => l[r] = m)), s = (0, n[w])(i ? i < 4 ? d ? o : c[k] : i > 4 ? void 0 : { get: c.get, set: c.set } : a, p), b._ = 1, i ^ 4 || s === void 0 ? D(s) && (i > 4 ? N.unshift(s) : i ? d ? o = s : c[k] = s : a = s) : typeof s != "object" || s === null ? C("Object expected") : (D(h = s.get) && (c.get = h), D(h = s.set) && (c.set = h), D(h = s.init) && N.unshift(h));
|
|
24
|
+
return i || ue(t, a), c && tt(a, r, c), d ? i ^ 4 ? o : c : a;
|
|
25
|
+
}, et = (t, e, r) => e.has(t) || C("Cannot " + r), _e = (t, e) => Object(e) !== e ? C('Cannot use the "in" operator on this value') : t.has(e), $t = (t, e, r) => (et(t, e, "read from private field"), r ? r.call(t) : e.get(t)), R = (t, e, r) => e.has(t) ? C("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), xt = (t, e, r, n) => (et(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), fe = (t, e, r) => (et(t, e, "access private method"), r), Mt, Lt, It, Wt, Rt, K, Bt, v, rt, it, at, ot, nt;
|
|
26
|
+
Bt = [J("nte-nav")];
|
|
27
|
+
class $ extends (K = j, Rt = [O({ type: String, reflect: !0 })], Wt = [O({ type: String, reflect: !0 })], It = [O({ type: String, reflect: !0, attribute: "transfer-to" })], Lt = [O({ type: String, reflect: !1, attribute: "data-group-name" })], Mt = [zt()], K) {
|
|
17
28
|
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
n(this, "mode", "slave");
|
|
20
|
-
n(this, "breakpoint", "99999px");
|
|
21
|
-
n(this, "transferTo", "");
|
|
22
|
-
n(this, "dataGroupName", "");
|
|
23
|
-
n(this, "_isTransferred", !1);
|
|
29
|
+
super(), R(this, rt, y(v, 8, this, "slave")), y(v, 11, this), R(this, it, y(v, 12, this, "99999px")), y(v, 15, this), R(this, at, y(v, 16, this, "")), y(v, 19, this), R(this, ot, y(v, 20, this, "")), y(v, 23, this), R(this, nt, y(v, 24, this, !1)), y(v, 27, this);
|
|
24
30
|
}
|
|
25
31
|
getOffcanvas() {
|
|
26
32
|
return this.transferTo ? document.querySelector(this.transferTo) : null;
|
|
@@ -30,7 +36,7 @@ let l = class extends b {
|
|
|
30
36
|
return e ? e.querySelector("nte-nav") : null;
|
|
31
37
|
}
|
|
32
38
|
render() {
|
|
33
|
-
return
|
|
39
|
+
return T` <nav>
|
|
34
40
|
<div id="burger-wrapper" ?hidden=${!this._isTransferred}>
|
|
35
41
|
<slot
|
|
36
42
|
name="burger"
|
|
@@ -44,7 +50,7 @@ let l = class extends b {
|
|
|
44
50
|
}}
|
|
45
51
|
>
|
|
46
52
|
<!-- fallback icon -->
|
|
47
|
-
${this._isTransferred ?
|
|
53
|
+
${this._isTransferred ? T`<div id="burger-default" style="display:flex; align-items: center; justify-content: center;">
|
|
48
54
|
<div id="text"><slot name="menu-text"></slot></div>
|
|
49
55
|
<nte-burger
|
|
50
56
|
data-group-name="${this.dataGroupName}"
|
|
@@ -62,69 +68,67 @@ let l = class extends b {
|
|
|
62
68
|
}
|
|
63
69
|
transferToElement(e) {
|
|
64
70
|
var a;
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
71
|
+
const r = (a = this.shadowRoot) == null ? void 0 : a.querySelector("#main-slot");
|
|
72
|
+
if (r === null)
|
|
67
73
|
return;
|
|
68
|
-
Array.from(
|
|
69
|
-
|
|
74
|
+
Array.from(r.assignedElements({ flatten: !0 })).forEach((o) => {
|
|
75
|
+
o instanceof HTMLElement && e.appendChild(o);
|
|
70
76
|
});
|
|
71
77
|
}
|
|
72
78
|
updated(e) {
|
|
73
|
-
var
|
|
79
|
+
var r, n;
|
|
74
80
|
super.updated(e), this._isTransferred ? this.transferToElement(
|
|
75
81
|
this.getOffcanvasNav() ?? (() => {
|
|
76
82
|
throw new Error("No offcanvas nav found");
|
|
77
83
|
})()
|
|
78
|
-
) : ((
|
|
84
|
+
) : ((r = this.getOffcanvasNav()) == null || r.transferToElement(this), (n = this.getOffcanvas()) == null || n.close());
|
|
79
85
|
}
|
|
80
86
|
firstUpdated(e) {
|
|
81
87
|
super.firstUpdated(e);
|
|
82
|
-
const
|
|
83
|
-
!
|
|
88
|
+
const r = this.classList;
|
|
89
|
+
!r.contains("nav-vertical") && !r.contains("nav-horizontal") && r.add(this.closest("nte-offcanvas") === null ? "nav-horizontal" : "nav-vertical");
|
|
84
90
|
}
|
|
85
91
|
async connectedCallback() {
|
|
86
|
-
await
|
|
87
|
-
|
|
92
|
+
await q(), super.connectedCallback(), this.mode !== "slave" && this.transferTo !== "" && (this._isTransferred = !1, this.breakpoint !== "" && (wt(this.breakpoint) || (this._isTransferred = !0), window.addEventListener("breakpoint-changed", (e) => {
|
|
93
|
+
wt(this.breakpoint) ? this._isTransferred = !1 : this._isTransferred = !0;
|
|
88
94
|
})));
|
|
89
95
|
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
],
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
96
|
+
}
|
|
97
|
+
v = pe(K);
|
|
98
|
+
rt = /* @__PURE__ */ new WeakMap();
|
|
99
|
+
it = /* @__PURE__ */ new WeakMap();
|
|
100
|
+
at = /* @__PURE__ */ new WeakMap();
|
|
101
|
+
ot = /* @__PURE__ */ new WeakMap();
|
|
102
|
+
nt = /* @__PURE__ */ new WeakMap();
|
|
103
|
+
P(v, 4, "mode", Rt, $, rt);
|
|
104
|
+
P(v, 4, "breakpoint", Wt, $, it);
|
|
105
|
+
P(v, 4, "transferTo", It, $, at);
|
|
106
|
+
P(v, 4, "dataGroupName", Lt, $, ot);
|
|
107
|
+
P(v, 4, "_isTransferred", Mt, $, nt);
|
|
108
|
+
$ = P(v, 0, "NteNav", Bt, $);
|
|
109
|
+
$.styles = [H(le)];
|
|
110
|
+
y(v, 1, $);
|
|
111
|
+
const ge = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--bg: transparent;--spacer-bg: transparent;--container-width: var(--nt-container-width, 100%);--brand-height: 80px;--spacer-height: 80px;width:100vw;margin:0}:host(a){height:85px;width:auto}#wrapper{position:relative;left:0;top:0;right:0;width:100%}#spacer{position:relative;top:0;left:0;width:100%;transition:height .3s ease-in-out;height:var(--spacer-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100vw;height:auto;background-color:var(--bg);z-index:1000}#main{width:100vw;display:block}";
|
|
112
|
+
var be = Object.create, st = Object.defineProperty, we = Object.getOwnPropertyDescriptor, Dt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), M = (t) => {
|
|
113
|
+
throw TypeError(t);
|
|
114
|
+
}, me = (t, e, r) => e in t ? st(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, kt = (t, e) => st(t, "name", { value: e, configurable: !0 }), ye = (t) => [, , , be((t == null ? void 0 : t[Dt("metadata")]) ?? null)], Yt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Y = (t) => t !== void 0 && typeof t != "function" ? M("Function expected") : t, Se = (t, e, r, n, a) => ({ kind: Yt[t], name: e, metadata: n, addInitializer: (o) => r._ ? M("Already initialized") : a.push(Y(o || null)) }), $e = (t, e) => me(e, Dt("metadata"), t[3]), Q = (t, e, r, n) => {
|
|
115
|
+
for (var a = 0, o = t[e >> 1], h = o && o.length; a < h; a++) e & 1 ? o[a].call(r) : n = o[a].call(r, n);
|
|
116
|
+
return n;
|
|
117
|
+
}, At = (t, e, r, n, a, o) => {
|
|
118
|
+
var h, s, b, p, f, i = e & 7, g = !!(e & 8), d = !!(e & 16), _ = i > 3 ? t.length + 1 : i ? g ? 1 : 2 : 0, k = Yt[i + 5], N = i > 3 && (t[_ - 1] = []), W = t[_] || (t[_] = []), c = i && (!d && !g && (a = a.prototype), i < 5 && (i > 3 || !d) && we(i < 4 ? a : { get [r]() {
|
|
119
|
+
return Nt(this, o);
|
|
120
|
+
}, set [r](l) {
|
|
121
|
+
return Ot(this, o, l);
|
|
122
|
+
} }, r));
|
|
123
|
+
i ? d && i < 4 && kt(o, (i > 2 ? "set " : i > 1 ? "get " : "") + r) : kt(a, r);
|
|
124
|
+
for (var w = n.length - 1; w >= 0; w--)
|
|
125
|
+
p = Se(i, r, b = {}, t[3], W), i && (p.static = g, p.private = d, f = p.access = { has: d ? (l) => xe(a, l) : (l) => r in l }, i ^ 3 && (f.get = d ? (l) => (i ^ 1 ? Nt : Ne)(l, a, i ^ 4 ? o : c.get) : (l) => l[r]), i > 2 && (f.set = d ? (l, m) => Ot(l, a, m, i ^ 4 ? o : c.set) : (l, m) => l[r] = m)), s = (0, n[w])(i ? i < 4 ? d ? o : c[k] : i > 4 ? void 0 : { get: c.get, set: c.set } : a, p), b._ = 1, i ^ 4 || s === void 0 ? Y(s) && (i > 4 ? N.unshift(s) : i ? d ? o = s : c[k] = s : a = s) : typeof s != "object" || s === null ? M("Object expected") : (Y(h = s.get) && (c.get = h), Y(h = s.set) && (c.set = h), Y(h = s.init) && N.unshift(h));
|
|
126
|
+
return i || $e(t, a), c && st(a, r, c), d ? i ^ 4 ? o : c : a;
|
|
127
|
+
}, lt = (t, e, r) => e.has(t) || M("Cannot " + r), xe = (t, e) => Object(e) !== e ? M('Cannot use the "in" operator on this value') : t.has(e), Nt = (t, e, r) => (lt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), ke = (t, e, r) => e.has(t) ? M("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Ot = (t, e, r, n) => (lt(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), Ne = (t, e, r) => (lt(t, e, "access private method"), r), Ft, V, Ut, z, dt;
|
|
128
|
+
Ut = [J("nte-navbar")];
|
|
129
|
+
class U extends (V = j, Ft = [O({ type: Number, attribute: "scroll-threshold", reflect: !0 })], V) {
|
|
117
130
|
constructor() {
|
|
118
|
-
super()
|
|
119
|
-
// lit refs for navbar and spacer
|
|
120
|
-
n(this, "navbarRef", w());
|
|
121
|
-
n(this, "spacerRef", w());
|
|
122
|
-
n(this, "scrollThreshold", 0);
|
|
123
|
-
// Track last scroll position to detect scroll direction
|
|
124
|
-
n(this, "_lastScrollY", window.scrollY);
|
|
125
|
-
n(this, "_scrollUpPixels", 0);
|
|
126
|
-
n(this, "_debouncer");
|
|
127
|
-
this._debouncer = new $(100, 300), document.addEventListener(
|
|
131
|
+
super(), this.navbarRef = mt(), this.spacerRef = mt(), ke(this, dt, Q(z, 8, this, 0)), Q(z, 11, this), this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = void 0, this._debouncer = new ie(100, 300), document.addEventListener(
|
|
128
132
|
"scroll",
|
|
129
133
|
async () => {
|
|
130
134
|
this.updateScrollState();
|
|
@@ -140,20 +144,20 @@ let p = class extends b {
|
|
|
140
144
|
e > 1 ? this.classList.add("is-scrolled") : this.classList.remove("is-scrolled"), e < this._lastScrollY ? (this._scrollUpPixels += this._lastScrollY - e, this._scrollUpPixels > 10 && e < this.scrollThreshold && this.classList.add("is-scrolling-up")) : (this._scrollUpPixels = 0, this.classList.remove("is-scrolling-up")), e > this.scrollThreshold ? this.classList.add("is-below-threshold") : this.classList.remove("is-below-threshold"), this._lastScrollY = e;
|
|
141
145
|
}
|
|
142
146
|
async connectedCallback() {
|
|
143
|
-
this.updateScrollState(), await
|
|
147
|
+
this.updateScrollState(), await q(), super.connectedCallback();
|
|
144
148
|
}
|
|
145
149
|
// Adjust the spacer height on every render
|
|
146
150
|
async updated(e) {
|
|
147
|
-
await
|
|
151
|
+
await q(), super.updated(e);
|
|
148
152
|
}
|
|
149
153
|
firstUpdated(e) {
|
|
150
|
-
|
|
154
|
+
Tt.observeEmptySlots(this);
|
|
151
155
|
}
|
|
152
156
|
render() {
|
|
153
|
-
return
|
|
157
|
+
return T`
|
|
154
158
|
<div id="wrapper" part="wrapper">
|
|
155
|
-
<div id="spacer" part="spacer" ${
|
|
156
|
-
<div id="navbar" part="navbar" ${
|
|
159
|
+
<div id="spacer" part="spacer" ${yt(this.spacerRef)}></div>
|
|
160
|
+
<div id="navbar" part="navbar" ${yt(this.navbarRef)}>
|
|
157
161
|
<div id="brand" part="brand">
|
|
158
162
|
<slot name="brand"></slot>
|
|
159
163
|
</div>
|
|
@@ -164,24 +168,30 @@ let p = class extends b {
|
|
|
164
168
|
</div>
|
|
165
169
|
`;
|
|
166
170
|
}
|
|
167
|
-
}
|
|
168
|
-
z
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return
|
|
180
|
-
},
|
|
181
|
-
|
|
171
|
+
}
|
|
172
|
+
z = ye(V);
|
|
173
|
+
dt = /* @__PURE__ */ new WeakMap();
|
|
174
|
+
At(z, 4, "scrollThreshold", Ft, U, dt);
|
|
175
|
+
U = At(z, 0, "NteNavbar", Ut, U);
|
|
176
|
+
U.styles = [H(ge)];
|
|
177
|
+
Q(z, 1, U);
|
|
178
|
+
const Oe = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--container-width: var(--nt-container-width, 100%);--background: transparent;--text-color: var(--nt-text);--height: auto;--brand-height: 80px;display:block;height:100%;width:100vw}:host(.hide-on-scroll){transition:max-height .3s ease-in-out;max-height:100px}:host(.hide-on-scroll.is-scrolled){max-height:0;overflow:hidden}#main{height:var(--height);transition:height .2s ease-in-out;overflow:visible;width:100%;display:flex;background:var(--background)}#container{width:var(--container-width);margin:0 auto;display:flex}#container #brand:has(slot[empty]){display:none}#container #brand{min-width:0;flex-shrink:1;width:auto;align-items:start;display:flex;height:100%;justify-items:center}#container #nav{display:flex;flex-grow:1;justify-content:end;align-items:center;gap:1rem}";
|
|
179
|
+
var Ee = Object.create, ct = Object.defineProperty, Te = Object.getOwnPropertyDescriptor, Gt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), qt = (t) => {
|
|
180
|
+
throw TypeError(t);
|
|
181
|
+
}, ze = (t, e, r) => e in t ? ct(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Ce = (t, e) => ct(t, "name", { value: e, configurable: !0 }), Pe = (t) => [, , , Ee((t == null ? void 0 : t[Gt("metadata")]) ?? null)], Me = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Ht = (t) => t !== void 0 && typeof t != "function" ? qt("Function expected") : t, Le = (t, e, r, n, a) => ({ kind: Me[t], name: e, metadata: n, addInitializer: (o) => r._ ? qt("Already initialized") : a.push(Ht(o || null)) }), Ie = (t, e) => ze(e, Gt("metadata"), t[3]), We = (t, e, r, n) => {
|
|
182
|
+
for (var a = 0, o = t[e >> 1], h = o && o.length; a < h; a++) o[a].call(r);
|
|
183
|
+
return n;
|
|
184
|
+
}, Re = (t, e, r, n, a, o) => {
|
|
185
|
+
var h, s, b, p = e & 7, f = !1, i = 0, g = t[i] || (t[i] = []), d = p && (a = a.prototype, p < 5 && (p > 3 || !f) && Te(a, r));
|
|
186
|
+
Ce(a, r);
|
|
187
|
+
for (var _ = n.length - 1; _ >= 0; _--)
|
|
188
|
+
b = Le(p, r, s = {}, t[3], g), h = (0, n[_])(a, b), s._ = 1, Ht(h) && (a = h);
|
|
189
|
+
return Ie(t, a), d && ct(a, r, d), f ? p ^ 4 ? o : d : a;
|
|
190
|
+
}, jt, ht, Jt;
|
|
191
|
+
jt = [J("nte-navbar-line")];
|
|
192
|
+
const bt = class bt extends (Jt = j) {
|
|
182
193
|
constructor() {
|
|
183
|
-
super(...arguments);
|
|
184
|
-
n(this, "_isScrolled", !1);
|
|
194
|
+
super(...arguments), this._isScrolled = !1;
|
|
185
195
|
}
|
|
186
196
|
static get is() {
|
|
187
197
|
return "nte-navbar-line";
|
|
@@ -194,10 +204,10 @@ let f = class extends b {
|
|
|
194
204
|
super.connectedCallback(), window.addEventListener("scroll", () => this.updateScrollState(), { passive: !0 });
|
|
195
205
|
}
|
|
196
206
|
async firstUpdated(e) {
|
|
197
|
-
|
|
207
|
+
Tt.observeEmptySlots(this), this.updateScrollState();
|
|
198
208
|
}
|
|
199
209
|
render() {
|
|
200
|
-
return
|
|
210
|
+
return T`
|
|
201
211
|
<div id="main" part="main">
|
|
202
212
|
<div id="container" part="container">
|
|
203
213
|
<div id="brand" part="brand">
|
|
@@ -211,12 +221,99 @@ let f = class extends b {
|
|
|
211
221
|
`;
|
|
212
222
|
}
|
|
213
223
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
224
|
+
bt.styles = [H(Oe)];
|
|
225
|
+
let G = bt;
|
|
226
|
+
ht = Pe(Jt);
|
|
227
|
+
G = Re(ht, 0, "NteNavbarLine", jt, G);
|
|
228
|
+
We(ht, 1, G);
|
|
229
|
+
const Be = ":host{display:table;--animation-duration: .3s}.wrapper{--orig-top: 0;--orig-left: 0;--orig-width: 0;--orig-height: 0;--self-top: 0;--self-left: 0;--self-width: 100%;--self-height: 100%;display:block;width:var(--self-width);height:var(--self-height);object-fit:contain;overflow:visible;position:fixed;top:var(--self-top);left:var(--self-left);transition:all var(--animation-duration) ease-in-out}.wrapper.inactive{z-index:99999;top:calc(var(--orig-top));left:calc(var(--orig-left));width:var(--orig-width);height:var(--orig-height)}.wrapper.inactive.done{z-index:inherit;visibility:hidden}.wrapper>slot{display:contents}.wrapper ::slotted(*){width:100%;height:100%;object-fit:contain;transition:all .3s ease-in-out}";
|
|
230
|
+
var De = Object.create, pt = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, Kt = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), L = (t) => {
|
|
231
|
+
throw TypeError(t);
|
|
232
|
+
}, Ae = (t, e, r) => e in t ? pt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Et = (t, e) => pt(t, "name", { value: e, configurable: !0 }), Fe = (t) => [, , , De((t == null ? void 0 : t[Kt("metadata")]) ?? null)], Qt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], A = (t) => t !== void 0 && typeof t != "function" ? L("Function expected") : t, Ue = (t, e, r, n, a) => ({ kind: Qt[t], name: e, metadata: n, addInitializer: (o) => r._ ? L("Already initialized") : a.push(A(o || null)) }), Ge = (t, e) => Ae(e, Kt("metadata"), t[3]), S = (t, e, r, n) => {
|
|
233
|
+
for (var a = 0, o = t[e >> 1], h = o && o.length; a < h; a++) e & 1 ? o[a].call(r) : n = o[a].call(r, n);
|
|
234
|
+
return n;
|
|
235
|
+
}, I = (t, e, r, n, a, o) => {
|
|
236
|
+
var h, s, b, p, f, i = e & 7, g = !!(e & 8), d = !!(e & 16), _ = i > 3 ? t.length + 1 : i ? g ? 1 : 2 : 0, k = Qt[i + 5], N = i > 3 && (t[_ - 1] = []), W = t[_] || (t[_] = []), c = i && (!d && !g && (a = a.prototype), i < 5 && (i > 3 || !d) && Ye(i < 4 ? a : { get [r]() {
|
|
237
|
+
return F(this, o);
|
|
238
|
+
}, set [r](l) {
|
|
239
|
+
return X(this, o, l);
|
|
240
|
+
} }, r));
|
|
241
|
+
i ? d && i < 4 && Et(o, (i > 2 ? "set " : i > 1 ? "get " : "") + r) : Et(a, r);
|
|
242
|
+
for (var w = n.length - 1; w >= 0; w--)
|
|
243
|
+
p = Ue(i, r, b = {}, t[3], W), i && (p.static = g, p.private = d, f = p.access = { has: d ? (l) => qe(a, l) : (l) => r in l }, i ^ 3 && (f.get = d ? (l) => (i ^ 1 ? F : He)(l, a, i ^ 4 ? o : c.get) : (l) => l[r]), i > 2 && (f.set = d ? (l, m) => X(l, a, m, i ^ 4 ? o : c.set) : (l, m) => l[r] = m)), s = (0, n[w])(i ? i < 4 ? d ? o : c[k] : i > 4 ? void 0 : { get: c.get, set: c.set } : a, p), b._ = 1, i ^ 4 || s === void 0 ? A(s) && (i > 4 ? N.unshift(s) : i ? d ? o = s : c[k] = s : a = s) : typeof s != "object" || s === null ? L("Object expected") : (A(h = s.get) && (c.get = h), A(h = s.set) && (c.set = h), A(h = s.init) && N.unshift(h));
|
|
244
|
+
return i || Ge(t, a), c && pt(a, r, c), d ? i ^ 4 ? o : c : a;
|
|
245
|
+
}, vt = (t, e, r) => e.has(t) || L("Cannot " + r), qe = (t, e) => Object(e) !== e ? L('Cannot use the "in" operator on this value') : t.has(e), F = (t, e, r) => (vt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), B = (t, e, r) => e.has(t) ? L("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), X = (t, e, r, n) => (vt(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), He = (t, e, r) => (vt(t, e, "access private method"), r), Vt, Xt, Zt, te, ee, Z, re, u, ut, _t, ft, gt, E;
|
|
246
|
+
re = [J("nte-nav-brand-relocator")];
|
|
247
|
+
class x extends (Z = ae(oe(j)), ee = [O({ type: String, reflect: !0 })], te = [O({ type: Boolean, reflect: !0 })], Zt = [O({ type: String, reflect: !0 })], Xt = [zt()], Vt = [ne("scroll", { target: "window", options: { passive: !0 } })], Z) {
|
|
248
|
+
constructor() {
|
|
249
|
+
super(...arguments), S(u, 5, this), B(this, ut, S(u, 8, this, ".brand-image")), S(u, 11, this), B(this, _t, S(u, 12, this, null)), S(u, 15, this), B(this, ft, S(u, 16, this, "auto")), S(u, 19, this), B(this, gt, S(u, 20, this, !1)), S(u, 23, this), B(this, E, null);
|
|
250
|
+
}
|
|
251
|
+
onScroll() {
|
|
252
|
+
if (this.mode !== "auto") {
|
|
253
|
+
this.log("Mode is not auto, skipping scroll handling");
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const e = window.scrollY <= 2;
|
|
257
|
+
e !== this.active && (this.active = e);
|
|
258
|
+
}
|
|
259
|
+
onanimationEnd() {
|
|
260
|
+
this.log("Animation ended - finalizing state"), this.active || (F(this, E).style.visibility = "visible", this.done = !0);
|
|
261
|
+
}
|
|
262
|
+
render() {
|
|
263
|
+
var a;
|
|
264
|
+
const e = (a = F(this, E)) == null ? void 0 : a.getBoundingClientRect(), r = this.getBoundingClientRect();
|
|
265
|
+
if (!e)
|
|
266
|
+
return T`<div>No brand element found</div>`;
|
|
267
|
+
const n = {
|
|
268
|
+
"--orig-top": e.top + "px",
|
|
269
|
+
"--orig-left": e.left + "px",
|
|
270
|
+
"--orig-width": e.width + "px",
|
|
271
|
+
"--orig-height": e.height + "px",
|
|
272
|
+
"--self-top": r.top + "px",
|
|
273
|
+
"--self-left": r.left + "px",
|
|
274
|
+
"--self-width": r.width + "px",
|
|
275
|
+
"--self-height": r.height + "px"
|
|
276
|
+
};
|
|
277
|
+
return T`<div
|
|
278
|
+
class="wrapper ${this.active ? "" : "inactive"} ${this.done ? "done" : ""}"
|
|
279
|
+
style=${se(n)}
|
|
280
|
+
@transitionend=${() => this.onanimationEnd()}
|
|
281
|
+
>
|
|
282
|
+
<slot></slot>
|
|
283
|
+
</div>`;
|
|
284
|
+
}
|
|
285
|
+
update(e) {
|
|
286
|
+
var r;
|
|
287
|
+
e.has("active") && this.active === !0 && ((r = F(this, E)) == null || r.style.setProperty("visibility", "hidden"), this.done = !1), super.update(e);
|
|
288
|
+
}
|
|
289
|
+
async firstUpdated() {
|
|
290
|
+
await q();
|
|
291
|
+
const e = X(this, E, document.querySelector(this.brandSelector));
|
|
292
|
+
if (!e) {
|
|
293
|
+
this.warn(`Brand element not found using selector: ${this.brandSelector}`);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
const r = e.cloneNode(!0);
|
|
297
|
+
this.appendChild(r), this.onScroll();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
u = Fe(Z);
|
|
301
|
+
ut = /* @__PURE__ */ new WeakMap();
|
|
302
|
+
_t = /* @__PURE__ */ new WeakMap();
|
|
303
|
+
ft = /* @__PURE__ */ new WeakMap();
|
|
304
|
+
gt = /* @__PURE__ */ new WeakMap();
|
|
305
|
+
E = /* @__PURE__ */ new WeakMap();
|
|
306
|
+
I(u, 4, "brandSelector", ee, x, ut);
|
|
307
|
+
I(u, 4, "active", te, x, _t);
|
|
308
|
+
I(u, 4, "mode", Zt, x, ft);
|
|
309
|
+
I(u, 4, "done", Xt, x, gt);
|
|
310
|
+
I(u, 1, "onScroll", Vt, x);
|
|
311
|
+
x = I(u, 0, "NteNavBrandRelocator", re, x);
|
|
312
|
+
x.styles = [H(Be)];
|
|
313
|
+
S(u, 1, x);
|
|
218
314
|
console.log("Loading nte-nav...");
|
|
219
315
|
export {
|
|
220
|
-
|
|
221
|
-
|
|
316
|
+
$ as NteNav,
|
|
317
|
+
x as NteNavBrandRelocator,
|
|
318
|
+
U as NteNavbar
|
|
222
319
|
};
|
package/lib/nte-nav.d.ts
CHANGED
|
@@ -9,11 +9,11 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class NteNav extends LitElement {
|
|
11
11
|
static styles: import('lit').CSSResult[];
|
|
12
|
-
mode: 'master' | 'slave';
|
|
13
|
-
breakpoint: string | number;
|
|
14
|
-
transferTo: string;
|
|
15
|
-
dataGroupName: string;
|
|
16
|
-
private _isTransferred;
|
|
12
|
+
accessor mode: 'master' | 'slave';
|
|
13
|
+
accessor breakpoint: string | number;
|
|
14
|
+
accessor transferTo: string;
|
|
15
|
+
accessor dataGroupName: string;
|
|
16
|
+
private accessor _isTransferred;
|
|
17
17
|
private getOffcanvas;
|
|
18
18
|
private getOffcanvasNav;
|
|
19
19
|
constructor();
|
package/lib/nte-navbar.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare class NteNavbar extends LitElement {
|
|
|
4
4
|
static styles: import('lit').CSSResult[];
|
|
5
5
|
private navbarRef;
|
|
6
6
|
private spacerRef;
|
|
7
|
-
scrollThreshold: number;
|
|
7
|
+
accessor scrollThreshold: number;
|
|
8
8
|
private _lastScrollY;
|
|
9
9
|
private _scrollUpPixels;
|
|
10
10
|
private _debouncer;
|