@nextrap/nte-nav 0.2.9 → 0.2.11
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/index.css +1 -1
- package/index.js +111 -99
- package/lib/nte-navbar.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 0.2.11 (2025-07-21)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.2.10 (2025-07-21)
|
|
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
|
## 0.2.9 (2025-07-21)
|
|
2
10
|
|
|
3
11
|
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
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,.nav-vertical ul li{position:relative;display:block}.nav-vertical ul>li>a,.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,.nav-vertical ul li>a.active,.nav-vertical ul li>a:active{background:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:hover,li:hover>.nav-vertical ul>li>a,.nav-vertical ul li>a:hover,li:hover>.nav-vertical ul li>a{background:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:after,.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,.nav-vertical ul li:has(ul)>a:after{opacity:.55}.nav-vertical ul>li:hover>a:after,.nav-vertical ul>li:focus-within>a:after,.nav-vertical ul li:hover>a:after,.nav-vertical ul li:focus-within>a:after{transform:rotate(135deg) scale(.85)}.nav-vertical ul>li:focus-within>ul,.nav-vertical ul li:focus-within>ul{display:flex}.nav-vertical ul>li>ul,.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,li>.nav-vertical ul li>ul,.nav-vertical ul li>ul:focus-within{display:flex}.nav-vertical ul>li>ul>li>a,.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,.nav-vertical ul li>ul>li>a:hover{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal{--item-padding: .65em 1.1em;--padding: 0}.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{--justify-content: space-between}.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;--hover-text-color: var(--nt-text);--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text)}.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:hover>a:after,.nav-horizontal ul>li:focus-within>a:after,.nav-horizontal ul li:hover>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);position:absolute;top:100%;left:0;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:last-child,.nav-horizontal ul li>ul:last-child{right:0;left:auto}.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}.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(--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: rgba(var(--nt-white-rgb), 1)}nte-navbar.autoborder.is-scrolled::part(navbar){border-bottom:1px solid rgba(var(--nt-text-rgb),.1)}nte-navbar.autoshadow::part(navbar){transition:box-shadow .3s ease-in-out}nte-navbar.autoshadow.is-scrolled::part(navbar){box-shadow:0 2px 10px rgba(var(--nt-text-rgb),.1)}nte-navbar.fixed::part(navbar){position:fixed;top:0;left:0;opacity:1;width:100
|
|
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,.nav-vertical ul li{position:relative;display:block}.nav-vertical ul>li>a,.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,.nav-vertical ul li>a.active,.nav-vertical ul li>a:active{background:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:hover,li:hover>.nav-vertical ul>li>a,.nav-vertical ul li>a:hover,li:hover>.nav-vertical ul li>a{background:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:after,.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,.nav-vertical ul li:has(ul)>a:after{opacity:.55}.nav-vertical ul>li:hover>a:after,.nav-vertical ul>li:focus-within>a:after,.nav-vertical ul li:hover>a:after,.nav-vertical ul li:focus-within>a:after{transform:rotate(135deg) scale(.85)}.nav-vertical ul>li:focus-within>ul,.nav-vertical ul li:focus-within>ul{display:flex}.nav-vertical ul>li>ul,.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,li>.nav-vertical ul li>ul,.nav-vertical ul li>ul:focus-within{display:flex}.nav-vertical ul>li>ul>li>a,.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,.nav-vertical ul li>ul>li>a:hover{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal{--item-padding: .65em 1.1em;--padding: 0}.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{--justify-content: space-between}.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;--hover-text-color: var(--nt-text);--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text)}.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:hover>a:after,.nav-horizontal ul>li:focus-within>a:after,.nav-horizontal ul li:hover>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);position:absolute;top:100%;left:0;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:last-child,.nav-horizontal ul li>ul:last-child{right:0;left:auto}.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}.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(--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: rgba(var(--nt-white-rgb), 1)}nte-navbar.autoborder.is-scrolled::part(navbar){border-bottom:1px solid rgba(var(--nt-text-rgb),.1)}nte-navbar.autoshadow::part(navbar){transition:box-shadow .3s ease-in-out}nte-navbar.autoshadow.is-scrolled::part(navbar){box-shadow:0 2px 10px rgba(var(--nt-text-rgb),.1)}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] img{height:var(--brand-height);width:auto}
|
package/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var Dt = function(s, t, e, i) {
|
|
|
25
25
|
d((i = i.apply(s, t || [])).next());
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
function
|
|
28
|
+
function jt() {
|
|
29
29
|
return Dt(this, void 0, void 0, function* () {
|
|
30
30
|
return new Promise((s) => {
|
|
31
31
|
if (document.readyState === "complete" || document.readyState === "interactive")
|
|
@@ -68,7 +68,7 @@ function lt(s) {
|
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
class
|
|
71
|
+
class Et {
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
74
|
* @param delay Debounce delay in milliseconds
|
|
@@ -119,7 +119,7 @@ function ht(s) {
|
|
|
119
119
|
}
|
|
120
120
|
if (!window.__nextrap_current_breakpoint) {
|
|
121
121
|
window.__nextrap_current_breakpoint = K();
|
|
122
|
-
const s = new
|
|
122
|
+
const s = new Et(200, 500);
|
|
123
123
|
window.addEventListener("resize", async () => {
|
|
124
124
|
if (await s.wait(), k !== K()) {
|
|
125
125
|
k = K(), window.__nextrap_current_breakpoint = k;
|
|
@@ -175,15 +175,25 @@ class it {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
+
function It() {
|
|
179
|
+
return document.readyState === "loading" ? new Promise((s) => {
|
|
180
|
+
document.addEventListener("DOMContentLoaded", () => s());
|
|
181
|
+
}) : Promise.resolve();
|
|
182
|
+
}
|
|
183
|
+
function Wt() {
|
|
184
|
+
return document.readyState === "complete" ? Promise.resolve() : new Promise((s) => {
|
|
185
|
+
window.addEventListener("load", () => s());
|
|
186
|
+
});
|
|
187
|
+
}
|
|
178
188
|
/**
|
|
179
189
|
* @license
|
|
180
190
|
* Copyright 2019 Google LLC
|
|
181
191
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
182
192
|
*/
|
|
183
|
-
const W = globalThis, nt = W.ShadowRoot && (W.ShadyCSS === void 0 || W.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
184
|
-
let
|
|
193
|
+
const W = globalThis, nt = W.ShadowRoot && (W.ShadyCSS === void 0 || W.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, St = Symbol(), ct = /* @__PURE__ */ new WeakMap();
|
|
194
|
+
let Ct = class {
|
|
185
195
|
constructor(t, e, i) {
|
|
186
|
-
if (this._$cssResult$ = !0, i !==
|
|
196
|
+
if (this._$cssResult$ = !0, i !== St) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
187
197
|
this.cssText = t, this.t = e;
|
|
188
198
|
}
|
|
189
199
|
get styleSheet() {
|
|
@@ -199,7 +209,7 @@ let Tt = class {
|
|
|
199
209
|
return this.cssText;
|
|
200
210
|
}
|
|
201
211
|
};
|
|
202
|
-
const P = (s) => new
|
|
212
|
+
const P = (s) => new Ct(typeof s == "string" ? s : s + "", void 0, St), Bt = (s, t) => {
|
|
203
213
|
if (nt) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
204
214
|
else for (const e of t) {
|
|
205
215
|
const i = document.createElement("style"), n = W.litNonce;
|
|
@@ -215,10 +225,10 @@ const P = (s) => new Tt(typeof s == "string" ? s : s + "", void 0, Ct), It = (s,
|
|
|
215
225
|
* Copyright 2017 Google LLC
|
|
216
226
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
217
227
|
*/
|
|
218
|
-
const { is:
|
|
228
|
+
const { is: Gt, defineProperty: qt, getOwnPropertyDescriptor: Vt, getOwnPropertyNames: Yt, getOwnPropertySymbols: Ft, getPrototypeOf: Jt } = Object, m = globalThis, pt = m.trustedTypes, Kt = pt ? pt.emptyScript : "", Z = m.reactiveElementPolyfillSupport, M = (s, t) => s, B = { toAttribute(s, t) {
|
|
219
229
|
switch (t) {
|
|
220
230
|
case Boolean:
|
|
221
|
-
s = s ?
|
|
231
|
+
s = s ? Kt : null;
|
|
222
232
|
break;
|
|
223
233
|
case Object:
|
|
224
234
|
case Array:
|
|
@@ -243,7 +253,7 @@ const { is: Wt, defineProperty: Bt, getOwnPropertyDescriptor: Gt, getOwnProperty
|
|
|
243
253
|
}
|
|
244
254
|
}
|
|
245
255
|
return e;
|
|
246
|
-
} }, rt = (s, t) => !
|
|
256
|
+
} }, rt = (s, t) => !Gt(s, t), ut = { attribute: !0, type: String, converter: B, reflect: !1, useDefault: !1, hasChanged: rt };
|
|
247
257
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), m.litPropertyMetadata ?? (m.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
248
258
|
let y = class extends HTMLElement {
|
|
249
259
|
static addInitializer(t) {
|
|
@@ -255,11 +265,11 @@ let y = class extends HTMLElement {
|
|
|
255
265
|
static createProperty(t, e = ut) {
|
|
256
266
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
257
267
|
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
|
258
|
-
n !== void 0 &&
|
|
268
|
+
n !== void 0 && qt(this.prototype, t, n);
|
|
259
269
|
}
|
|
260
270
|
}
|
|
261
271
|
static getPropertyDescriptor(t, e, i) {
|
|
262
|
-
const { get: n, set: r } =
|
|
272
|
+
const { get: n, set: r } = Vt(this.prototype, t) ?? { get() {
|
|
263
273
|
return this[e];
|
|
264
274
|
}, set(o) {
|
|
265
275
|
this[e] = o;
|
|
@@ -274,13 +284,13 @@ let y = class extends HTMLElement {
|
|
|
274
284
|
}
|
|
275
285
|
static _$Ei() {
|
|
276
286
|
if (this.hasOwnProperty(M("elementProperties"))) return;
|
|
277
|
-
const t =
|
|
287
|
+
const t = Jt(this);
|
|
278
288
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
279
289
|
}
|
|
280
290
|
static finalize() {
|
|
281
291
|
if (this.hasOwnProperty(M("finalized"))) return;
|
|
282
292
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
|
283
|
-
const e = this.properties, i = [...
|
|
293
|
+
const e = this.properties, i = [...Yt(e), ...Ft(e)];
|
|
284
294
|
for (const n of i) this.createProperty(n, e[n]);
|
|
285
295
|
}
|
|
286
296
|
const t = this[Symbol.metadata];
|
|
@@ -329,7 +339,7 @@ let y = class extends HTMLElement {
|
|
|
329
339
|
}
|
|
330
340
|
createRenderRoot() {
|
|
331
341
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
332
|
-
return
|
|
342
|
+
return Bt(t, this.constructor.elementStyles), t;
|
|
333
343
|
}
|
|
334
344
|
connectedCallback() {
|
|
335
345
|
var t;
|
|
@@ -454,42 +464,42 @@ y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[M("elementProper
|
|
|
454
464
|
* Copyright 2017 Google LLC
|
|
455
465
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
456
466
|
*/
|
|
457
|
-
const U = globalThis, G = U.trustedTypes, ft = G ? G.createPolicy("lit-html", { createHTML: (s) => s }) : void 0,
|
|
467
|
+
const U = globalThis, G = U.trustedTypes, ft = G ? G.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Tt = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, Pt = "?" + v, Zt = `<${Pt}>`, x = document, H = () => x.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", ot = Array.isArray, Qt = (s) => ot(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Q = `[
|
|
458
468
|
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, vt = /-->/g, mt = />/g, _ = RegExp(`>|${Q}(?:([^\\s"'>=/]+)(${Q}*=${Q}*(?:[^
|
|
459
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), gt = /'/g, $t = /"/g,
|
|
460
|
-
function
|
|
469
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), gt = /'/g, $t = /"/g, kt = /^(?:script|style|textarea|title)$/i, Xt = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = Xt(1), E = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), _t = /* @__PURE__ */ new WeakMap(), b = x.createTreeWalker(x, 129);
|
|
470
|
+
function Ot(s, t) {
|
|
461
471
|
if (!ot(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
462
472
|
return ft !== void 0 ? ft.createHTML(t) : t;
|
|
463
473
|
}
|
|
464
|
-
const
|
|
474
|
+
const te = (s, t) => {
|
|
465
475
|
const e = s.length - 1, i = [];
|
|
466
476
|
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = O;
|
|
467
477
|
for (let l = 0; l < e; l++) {
|
|
468
478
|
const a = s[l];
|
|
469
479
|
let d, h, c = -1, u = 0;
|
|
470
|
-
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o === O ? h[1] === "!--" ? o = vt : h[1] !== void 0 ? o = mt : h[2] !== void 0 ? (
|
|
480
|
+
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o === O ? h[1] === "!--" ? o = vt : h[1] !== void 0 ? o = mt : h[2] !== void 0 ? (kt.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = _) : h[3] !== void 0 && (o = _) : o === _ ? h[0] === ">" ? (o = n ?? O, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, d = h[1], o = h[3] === void 0 ? _ : h[3] === '"' ? $t : gt) : o === $t || o === gt ? o = _ : o === vt || o === mt ? o = O : (o = _, n = void 0);
|
|
471
481
|
const f = o === _ && s[l + 1].startsWith("/>") ? " " : "";
|
|
472
|
-
r += o === O ? a +
|
|
482
|
+
r += o === O ? a + Zt : c >= 0 ? (i.push(d), a.slice(0, c) + Tt + a.slice(c) + v + f) : a + v + (c === -2 ? l : f);
|
|
473
483
|
}
|
|
474
|
-
return [
|
|
484
|
+
return [Ot(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
475
485
|
};
|
|
476
|
-
class
|
|
486
|
+
class D {
|
|
477
487
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
478
488
|
let n;
|
|
479
489
|
this.parts = [];
|
|
480
490
|
let r = 0, o = 0;
|
|
481
|
-
const l = t.length - 1, a = this.parts, [d, h] =
|
|
482
|
-
if (this.el =
|
|
491
|
+
const l = t.length - 1, a = this.parts, [d, h] = te(t, e);
|
|
492
|
+
if (this.el = D.createElement(d, i), b.currentNode = this.el.content, e === 2 || e === 3) {
|
|
483
493
|
const c = this.el.content.firstChild;
|
|
484
494
|
c.replaceWith(...c.childNodes);
|
|
485
495
|
}
|
|
486
496
|
for (; (n = b.nextNode()) !== null && a.length < l; ) {
|
|
487
497
|
if (n.nodeType === 1) {
|
|
488
|
-
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(
|
|
498
|
+
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(Tt)) {
|
|
489
499
|
const u = h[o++], f = n.getAttribute(c).split(v), I = /([.?@])?(.*)/.exec(u);
|
|
490
|
-
a.push({ type: 1, index: r, name: I[2], strings: f, ctor: I[1] === "." ?
|
|
500
|
+
a.push({ type: 1, index: r, name: I[2], strings: f, ctor: I[1] === "." ? se : I[1] === "?" ? ie : I[1] === "@" ? ne : Y }), n.removeAttribute(c);
|
|
491
501
|
} else c.startsWith(v) && (a.push({ type: 6, index: r }), n.removeAttribute(c));
|
|
492
|
-
if (
|
|
502
|
+
if (kt.test(n.tagName)) {
|
|
493
503
|
const c = n.textContent.split(v), u = c.length - 1;
|
|
494
504
|
if (u > 0) {
|
|
495
505
|
n.textContent = G ? G.emptyScript : "";
|
|
@@ -497,7 +507,7 @@ class j {
|
|
|
497
507
|
n.append(c[u], H());
|
|
498
508
|
}
|
|
499
509
|
}
|
|
500
|
-
} else if (n.nodeType === 8) if (n.data ===
|
|
510
|
+
} else if (n.nodeType === 8) if (n.data === Pt) a.push({ type: 2, index: r });
|
|
501
511
|
else {
|
|
502
512
|
let c = -1;
|
|
503
513
|
for (; (c = n.data.indexOf(v, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += v.length - 1;
|
|
@@ -517,7 +527,7 @@ function T(s, t, e = s, i) {
|
|
|
517
527
|
const r = L(t) ? void 0 : t._$litDirective$;
|
|
518
528
|
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = T(s, n._$AS(s, t.values), n, i)), t;
|
|
519
529
|
}
|
|
520
|
-
class
|
|
530
|
+
class ee {
|
|
521
531
|
constructor(t, e) {
|
|
522
532
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
523
533
|
}
|
|
@@ -534,7 +544,7 @@ class Xt {
|
|
|
534
544
|
for (; a !== void 0; ) {
|
|
535
545
|
if (o === a.index) {
|
|
536
546
|
let d;
|
|
537
|
-
a.type === 2 ? d = new
|
|
547
|
+
a.type === 2 ? d = new j(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new re(r, this, t)), this._$AV.push(d), a = i[++l];
|
|
538
548
|
}
|
|
539
549
|
o !== (a == null ? void 0 : a.index) && (r = b.nextNode(), o++);
|
|
540
550
|
}
|
|
@@ -545,7 +555,7 @@ class Xt {
|
|
|
545
555
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
546
556
|
}
|
|
547
557
|
}
|
|
548
|
-
class
|
|
558
|
+
class j {
|
|
549
559
|
get _$AU() {
|
|
550
560
|
var t;
|
|
551
561
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
@@ -565,7 +575,7 @@ class D {
|
|
|
565
575
|
return this._$AB;
|
|
566
576
|
}
|
|
567
577
|
_$AI(t, e = this) {
|
|
568
|
-
t = T(this, t, e), L(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
578
|
+
t = T(this, t, e), L(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Qt(t) ? this.k(t) : this._(t);
|
|
569
579
|
}
|
|
570
580
|
O(t) {
|
|
571
581
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -578,22 +588,22 @@ class D {
|
|
|
578
588
|
}
|
|
579
589
|
$(t) {
|
|
580
590
|
var r;
|
|
581
|
-
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
|
591
|
+
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(Ot(i.h, i.h[0]), this.options)), i);
|
|
582
592
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
583
593
|
else {
|
|
584
|
-
const o = new
|
|
594
|
+
const o = new ee(n, this), l = o.u(this.options);
|
|
585
595
|
o.p(e), this.T(l), this._$AH = o;
|
|
586
596
|
}
|
|
587
597
|
}
|
|
588
598
|
_$AC(t) {
|
|
589
599
|
let e = _t.get(t.strings);
|
|
590
|
-
return e === void 0 && _t.set(t.strings, e = new
|
|
600
|
+
return e === void 0 && _t.set(t.strings, e = new D(t)), e;
|
|
591
601
|
}
|
|
592
602
|
k(t) {
|
|
593
603
|
ot(this._$AH) || (this._$AH = [], this._$AR());
|
|
594
604
|
const e = this._$AH;
|
|
595
605
|
let i, n = 0;
|
|
596
|
-
for (const r of t) n === e.length ? e.push(i = new
|
|
606
|
+
for (const r of t) n === e.length ? e.push(i = new j(this.O(H()), this.O(H()), this, this.options)) : i = e[n], i._$AI(r), n++;
|
|
597
607
|
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
|
598
608
|
}
|
|
599
609
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -633,7 +643,7 @@ class Y {
|
|
|
633
643
|
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
634
644
|
}
|
|
635
645
|
}
|
|
636
|
-
class
|
|
646
|
+
class se extends Y {
|
|
637
647
|
constructor() {
|
|
638
648
|
super(...arguments), this.type = 3;
|
|
639
649
|
}
|
|
@@ -641,7 +651,7 @@ class te extends Y {
|
|
|
641
651
|
this.element[this.name] = t === p ? void 0 : t;
|
|
642
652
|
}
|
|
643
653
|
}
|
|
644
|
-
class
|
|
654
|
+
class ie extends Y {
|
|
645
655
|
constructor() {
|
|
646
656
|
super(...arguments), this.type = 4;
|
|
647
657
|
}
|
|
@@ -649,7 +659,7 @@ class ee extends Y {
|
|
|
649
659
|
this.element.toggleAttribute(this.name, !!t && t !== p);
|
|
650
660
|
}
|
|
651
661
|
}
|
|
652
|
-
class
|
|
662
|
+
class ne extends Y {
|
|
653
663
|
constructor(t, e, i, n, r) {
|
|
654
664
|
super(t, e, i, n, r), this.type = 5;
|
|
655
665
|
}
|
|
@@ -663,7 +673,7 @@ class se extends Y {
|
|
|
663
673
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
664
674
|
}
|
|
665
675
|
}
|
|
666
|
-
class
|
|
676
|
+
class re {
|
|
667
677
|
constructor(t, e, i) {
|
|
668
678
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
669
679
|
}
|
|
@@ -675,13 +685,13 @@ class ie {
|
|
|
675
685
|
}
|
|
676
686
|
}
|
|
677
687
|
const X = U.litHtmlPolyfillSupport;
|
|
678
|
-
X == null || X(
|
|
679
|
-
const
|
|
688
|
+
X == null || X(D, j), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.3.1");
|
|
689
|
+
const oe = (s, t, e) => {
|
|
680
690
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
681
691
|
let n = i._$litPart$;
|
|
682
692
|
if (n === void 0) {
|
|
683
693
|
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
684
|
-
i._$litPart$ = n = new
|
|
694
|
+
i._$litPart$ = n = new j(t.insertBefore(H(), r), r, void 0, e ?? {});
|
|
685
695
|
}
|
|
686
696
|
return n._$AI(s), n;
|
|
687
697
|
};
|
|
@@ -702,7 +712,7 @@ let g = class extends y {
|
|
|
702
712
|
}
|
|
703
713
|
update(t) {
|
|
704
714
|
const e = this.render();
|
|
705
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
715
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = oe(e, this.renderRoot, this.renderOptions);
|
|
706
716
|
}
|
|
707
717
|
connectedCallback() {
|
|
708
718
|
var t;
|
|
@@ -736,7 +746,7 @@ const F = (s) => (t, e) => {
|
|
|
736
746
|
* Copyright 2017 Google LLC
|
|
737
747
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
738
748
|
*/
|
|
739
|
-
const
|
|
749
|
+
const ae = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged: rt }, le = (s = ae, t, e) => {
|
|
740
750
|
const { kind: i, metadata: n } = e;
|
|
741
751
|
let r = globalThis.litPropertyMetadata.get(n);
|
|
742
752
|
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), r.set(e.name, s), i === "accessor") {
|
|
@@ -758,7 +768,7 @@ const re = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged:
|
|
|
758
768
|
throw Error("Unsupported decorator location: " + i);
|
|
759
769
|
};
|
|
760
770
|
function S(s) {
|
|
761
|
-
return (t, e) => typeof e == "object" ?
|
|
771
|
+
return (t, e) => typeof e == "object" ? le(s, t, e) : ((i, n, r) => {
|
|
762
772
|
const o = n.hasOwnProperty(r);
|
|
763
773
|
return n.constructor.createProperty(r, i), o ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
764
774
|
})(s, t, e);
|
|
@@ -768,10 +778,10 @@ function S(s) {
|
|
|
768
778
|
* Copyright 2017 Google LLC
|
|
769
779
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
770
780
|
*/
|
|
771
|
-
function
|
|
781
|
+
function Mt(s) {
|
|
772
782
|
return S({ ...s, state: !0, attribute: !1 });
|
|
773
783
|
}
|
|
774
|
-
function
|
|
784
|
+
function he(s, t) {
|
|
775
785
|
const e = document.createElement("template");
|
|
776
786
|
return e.innerHTML = s.trim(), t.append(e.content.cloneNode(!0)), new Proxy({}, {
|
|
777
787
|
get(i, n) {
|
|
@@ -790,13 +800,13 @@ const at = class at extends y {
|
|
|
790
800
|
constructor(t) {
|
|
791
801
|
super();
|
|
792
802
|
const e = this.createRenderRoot();
|
|
793
|
-
this.$ =
|
|
803
|
+
this.$ = he(t, e);
|
|
794
804
|
}
|
|
795
805
|
connectedCallback() {
|
|
796
806
|
super.connectedCallback();
|
|
797
807
|
let t = this.css;
|
|
798
808
|
Array.isArray(t) || (t = [t]);
|
|
799
|
-
const e = t.map((i) => i instanceof
|
|
809
|
+
const e = t.map((i) => i instanceof Ct ? i.styleSheet : P(i).styleSheet);
|
|
800
810
|
this.shadowRoot.adoptedStyleSheets = e;
|
|
801
811
|
}
|
|
802
812
|
};
|
|
@@ -810,8 +820,8 @@ let yt = at;
|
|
|
810
820
|
* Copyright 2017 Google LLC
|
|
811
821
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
812
822
|
*/
|
|
813
|
-
const
|
|
814
|
-
class
|
|
823
|
+
const Ut = { ATTRIBUTE: 1, CHILD: 2 }, Nt = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
|
824
|
+
class Ht {
|
|
815
825
|
constructor(t) {
|
|
816
826
|
}
|
|
817
827
|
get _$AU() {
|
|
@@ -832,10 +842,10 @@ class Lt {
|
|
|
832
842
|
* Copyright 2018 Google LLC
|
|
833
843
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
834
844
|
*/
|
|
835
|
-
const bt =
|
|
845
|
+
const bt = Nt(class extends Ht {
|
|
836
846
|
constructor(s) {
|
|
837
847
|
var t;
|
|
838
|
-
if (super(s), s.type !==
|
|
848
|
+
if (super(s), s.type !== Ut.ATTRIBUTE || s.name !== "class" || ((t = s.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
839
849
|
}
|
|
840
850
|
render(s) {
|
|
841
851
|
return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
|
|
@@ -855,11 +865,11 @@ const bt = Ht(class extends Lt {
|
|
|
855
865
|
}
|
|
856
866
|
return E;
|
|
857
867
|
}
|
|
858
|
-
}),
|
|
859
|
-
var
|
|
860
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
868
|
+
}), ce = "*,*: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{--backdrop: rgba(var(--nt-dark-rgb), .5);--header-background: var(--nt-soft-primary);--background-color: var(--nt-white);--shadow-color: rgba(var(--nt-dark-rgb), .5);--padding: var(--nt-space);position:fixed;top:0;right:0;bottom:0;width:50%;min-width:300px;max-width:500px;z-index:2000;padding:0;isolation:isolate;display:block}:host[opened]{display:block}#offcanvas{display:flex;flex-direction:column;width:100%;height:100%;overflow:scroll;background-color:var(--background-color);box-shadow:0 0 10px var(--shadow-color);transition:transform .2s ease-in-out;transform:translate(0)}#offcanvas.closed{transform:translate(100%)}#header{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--header-background);flex-grow:0;padding:var(--padding)}#header:has(>slot[empty]){display:none}#main{display:flex;width:100%;flex-grow:1;padding:var(--padding);min-height:200px;overflow:auto;height:100%}#footer{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;margin-top:auto;flex-grow:0;padding:var(--padding)}#footer:has(>slot[empty]){display:none}#backdrop{opacity:1;transition:opacity .2s ease-in-out;position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--backdrop);z-index:-1;display:block}#backdrop.closed{opacity:0}";
|
|
869
|
+
var de = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, J = (s, t, e, i) => {
|
|
870
|
+
for (var n = i > 1 ? void 0 : i ? pe(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
861
871
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
862
|
-
return i && n &&
|
|
872
|
+
return i && n && de(t, e, n), n;
|
|
863
873
|
};
|
|
864
874
|
let A = class extends g {
|
|
865
875
|
constructor() {
|
|
@@ -916,7 +926,7 @@ let A = class extends g {
|
|
|
916
926
|
`;
|
|
917
927
|
}
|
|
918
928
|
};
|
|
919
|
-
A.styles = [P(
|
|
929
|
+
A.styles = [P(ce)];
|
|
920
930
|
J([
|
|
921
931
|
S({ type: Boolean, reflect: !0 })
|
|
922
932
|
], A.prototype, "backdrop", 2);
|
|
@@ -924,16 +934,16 @@ J([
|
|
|
924
934
|
S({ type: Boolean, reflect: !0 })
|
|
925
935
|
], A.prototype, "opened", 2);
|
|
926
936
|
J([
|
|
927
|
-
|
|
937
|
+
Mt()
|
|
928
938
|
], A.prototype, "closedClass", 2);
|
|
929
939
|
A = J([
|
|
930
940
|
F(A.is)
|
|
931
941
|
], A);
|
|
932
|
-
const
|
|
933
|
-
var
|
|
934
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
942
|
+
const ue = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text-color);--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-soft-primary);--justify-sidebar-burger: flex-end;--height: auto;height:var(--height);display:block}nav{height:100%}#main{height:100%}";
|
|
943
|
+
var fe = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, z = (s, t, e, i) => {
|
|
944
|
+
for (var n = i > 1 ? void 0 : i ? ve(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
935
945
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
936
|
-
return i && n &&
|
|
946
|
+
return i && n && fe(t, e, n), n;
|
|
937
947
|
};
|
|
938
948
|
let $ = class extends g {
|
|
939
949
|
constructor() {
|
|
@@ -974,6 +984,8 @@ let $ = class extends g {
|
|
|
974
984
|
transferToElement(s) {
|
|
975
985
|
var i;
|
|
976
986
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("#main-slot");
|
|
987
|
+
if (t === null)
|
|
988
|
+
return;
|
|
977
989
|
Array.from(t.assignedElements({ flatten: !0 })).forEach((n) => {
|
|
978
990
|
n instanceof HTMLElement && s.appendChild(n);
|
|
979
991
|
});
|
|
@@ -992,7 +1004,7 @@ let $ = class extends g {
|
|
|
992
1004
|
!t.contains("nav-vertical") && !t.contains("nav-horizontal") && t.add(this.closest("nte-offcanvas") === null ? "nav-horizontal" : "nav-vertical");
|
|
993
1005
|
}
|
|
994
1006
|
async connectedCallback() {
|
|
995
|
-
await
|
|
1007
|
+
await jt(), super.connectedCallback(), this.mode !== "slave" && this.transferTo !== "" && (this._isTransferred = !1, this.breakpoint !== "" && (ht(this.breakpoint) || (this._isTransferred = !0), window.addEventListener("breakpoint-changed", (s) => {
|
|
996
1008
|
ht(this.breakpoint) ? this._isTransferred = !1 : this._isTransferred = !0;
|
|
997
1009
|
})));
|
|
998
1010
|
}
|
|
@@ -1001,7 +1013,7 @@ $.DEFINITION = {
|
|
|
1001
1013
|
classes: ["align-left", "align-right", "align-center"],
|
|
1002
1014
|
attributes: {}
|
|
1003
1015
|
};
|
|
1004
|
-
$.styles = [P(
|
|
1016
|
+
$.styles = [P(ue)];
|
|
1005
1017
|
z([
|
|
1006
1018
|
S({ type: String, reflect: !0 })
|
|
1007
1019
|
], $.prototype, "mode", 2);
|
|
@@ -1012,7 +1024,7 @@ z([
|
|
|
1012
1024
|
S({ type: String, reflect: !0, attribute: "transfer-to" })
|
|
1013
1025
|
], $.prototype, "transferTo", 2);
|
|
1014
1026
|
z([
|
|
1015
|
-
|
|
1027
|
+
Mt()
|
|
1016
1028
|
], $.prototype, "_isTransferred", 2);
|
|
1017
1029
|
$ = z([
|
|
1018
1030
|
F("nte-nav")
|
|
@@ -1022,7 +1034,7 @@ $ = z([
|
|
|
1022
1034
|
* Copyright 2020 Google LLC
|
|
1023
1035
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1024
1036
|
*/
|
|
1025
|
-
const
|
|
1037
|
+
const me = (s) => s.strings === void 0;
|
|
1026
1038
|
/**
|
|
1027
1039
|
* @license
|
|
1028
1040
|
* Copyright 2017 Google LLC
|
|
@@ -1040,39 +1052,39 @@ const N = (s, t) => {
|
|
|
1040
1052
|
if ((t = s._$AM) === void 0) break;
|
|
1041
1053
|
e = t._$AN, e.delete(s), s = t;
|
|
1042
1054
|
} while ((e == null ? void 0 : e.size) === 0);
|
|
1043
|
-
},
|
|
1055
|
+
}, Lt = (s) => {
|
|
1044
1056
|
for (let t; t = s._$AM; s = t) {
|
|
1045
1057
|
let e = t._$AN;
|
|
1046
1058
|
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
|
1047
1059
|
else if (e.has(s)) break;
|
|
1048
|
-
e.add(s),
|
|
1060
|
+
e.add(s), _e(t);
|
|
1049
1061
|
}
|
|
1050
1062
|
};
|
|
1051
|
-
function
|
|
1052
|
-
this._$AN !== void 0 ? (q(this), this._$AM = s,
|
|
1063
|
+
function ge(s) {
|
|
1064
|
+
this._$AN !== void 0 ? (q(this), this._$AM = s, Lt(this)) : this._$AM = s;
|
|
1053
1065
|
}
|
|
1054
|
-
function
|
|
1066
|
+
function $e(s, t = !1, e = 0) {
|
|
1055
1067
|
const i = this._$AH, n = this._$AN;
|
|
1056
1068
|
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(i)) for (let r = e; r < i.length; r++) N(i[r], !1), q(i[r]);
|
|
1057
1069
|
else i != null && (N(i, !1), q(i));
|
|
1058
1070
|
else N(this, s);
|
|
1059
1071
|
}
|
|
1060
|
-
const
|
|
1061
|
-
s.type ==
|
|
1072
|
+
const _e = (s) => {
|
|
1073
|
+
s.type == Ut.CHILD && (s._$AP ?? (s._$AP = $e), s._$AQ ?? (s._$AQ = ge));
|
|
1062
1074
|
};
|
|
1063
|
-
class
|
|
1075
|
+
class ye extends Ht {
|
|
1064
1076
|
constructor() {
|
|
1065
1077
|
super(...arguments), this._$AN = void 0;
|
|
1066
1078
|
}
|
|
1067
1079
|
_$AT(t, e, i) {
|
|
1068
|
-
super._$AT(t, e, i),
|
|
1080
|
+
super._$AT(t, e, i), Lt(this), this.isConnected = t._$AU;
|
|
1069
1081
|
}
|
|
1070
1082
|
_$AO(t, e = !0) {
|
|
1071
1083
|
var i, n;
|
|
1072
1084
|
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (N(this, t), q(this));
|
|
1073
1085
|
}
|
|
1074
1086
|
setValue(t) {
|
|
1075
|
-
if (
|
|
1087
|
+
if (me(this._$Ct)) this._$Ct._$AI(t, this);
|
|
1076
1088
|
else {
|
|
1077
1089
|
const e = [...this._$Ct._$AH];
|
|
1078
1090
|
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
@@ -1088,10 +1100,10 @@ class $e extends Lt {
|
|
|
1088
1100
|
* Copyright 2020 Google LLC
|
|
1089
1101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1090
1102
|
*/
|
|
1091
|
-
const wt = () => new
|
|
1092
|
-
class
|
|
1103
|
+
const wt = () => new be();
|
|
1104
|
+
class be {
|
|
1093
1105
|
}
|
|
1094
|
-
const et = /* @__PURE__ */ new WeakMap(), At =
|
|
1106
|
+
const et = /* @__PURE__ */ new WeakMap(), At = Nt(class extends ye {
|
|
1095
1107
|
render(s) {
|
|
1096
1108
|
return p;
|
|
1097
1109
|
}
|
|
@@ -1117,15 +1129,15 @@ const et = /* @__PURE__ */ new WeakMap(), At = Ht(class extends $e {
|
|
|
1117
1129
|
reconnected() {
|
|
1118
1130
|
this.rt(this.ct);
|
|
1119
1131
|
}
|
|
1120
|
-
}),
|
|
1121
|
-
var
|
|
1122
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
1132
|
+
}), we = "*,*: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;isolation:isolate;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%;height:var(--brand-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100%;height:auto;background-color:var(--bg);z-index:1000}#main{width:100%;display:block}";
|
|
1133
|
+
var Ae = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Rt = (s, t, e, i) => {
|
|
1134
|
+
for (var n = i > 1 ? void 0 : i ? xe(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1123
1135
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
1124
|
-
return i && n &&
|
|
1136
|
+
return i && n && Ae(t, e, n), n;
|
|
1125
1137
|
};
|
|
1126
1138
|
let V = class extends g {
|
|
1127
1139
|
constructor() {
|
|
1128
|
-
super(), this.navbarRef = wt(), this.spacerRef = wt(), this.scrollThreshold = 0, this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = new
|
|
1140
|
+
super(), this.navbarRef = wt(), this.spacerRef = wt(), this.scrollThreshold = 0, this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = new Et(100, 300), document.addEventListener(
|
|
1129
1141
|
"scroll",
|
|
1130
1142
|
async () => {
|
|
1131
1143
|
this.updateScrollState();
|
|
@@ -1141,13 +1153,13 @@ let V = class extends g {
|
|
|
1141
1153
|
s > 1 ? this.classList.add("is-scrolled") : this.classList.remove("is-scrolled"), s < this._lastScrollY ? (this._scrollUpPixels += this._lastScrollY - s, this._scrollUpPixels > 10 && s < this.scrollThreshold && this.classList.add("is-scrolling-up")) : (this._scrollUpPixels = 0, this.classList.remove("is-scrolling-up")), s > this.scrollThreshold ? this.classList.add("is-below-threshold") : this.classList.remove("is-below-threshold"), this._lastScrollY = s;
|
|
1142
1154
|
}
|
|
1143
1155
|
async connectedCallback() {
|
|
1144
|
-
this.updateScrollState(), await
|
|
1156
|
+
this.updateScrollState(), await It(), super.connectedCallback();
|
|
1145
1157
|
}
|
|
1146
1158
|
// Adjust the spacer height on every render
|
|
1147
|
-
updated(s) {
|
|
1148
|
-
super.updated(s);
|
|
1159
|
+
async updated(s) {
|
|
1160
|
+
await Wt(), super.updated(s);
|
|
1149
1161
|
const t = this.navbarRef.value, e = this.spacerRef.value;
|
|
1150
|
-
t && e && (e.style.height = `${t.offsetHeight}px`);
|
|
1162
|
+
console.log("Updating spacer height", t == null ? void 0 : t.offsetHeight, e), t && e && (e.style.height = `${t.offsetHeight}px`);
|
|
1151
1163
|
}
|
|
1152
1164
|
firstUpdated(s) {
|
|
1153
1165
|
it.observeEmptySlots(this);
|
|
@@ -1168,16 +1180,16 @@ let V = class extends g {
|
|
|
1168
1180
|
`;
|
|
1169
1181
|
}
|
|
1170
1182
|
};
|
|
1171
|
-
V.styles = [P(
|
|
1172
|
-
|
|
1183
|
+
V.styles = [P(we)];
|
|
1184
|
+
Rt([
|
|
1173
1185
|
S({ type: Number, attribute: "scroll-threshold", reflect: !0 })
|
|
1174
1186
|
], V.prototype, "scrollThreshold", 2);
|
|
1175
|
-
V =
|
|
1187
|
+
V = Rt([
|
|
1176
1188
|
F("nte-navbar")
|
|
1177
1189
|
], V);
|
|
1178
|
-
const
|
|
1179
|
-
var
|
|
1180
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
1190
|
+
const Ee = "*,*: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%}: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{width:auto;align-items:start;display:flex;height:100%;justify-items:center}#container #brand:has(slot[empty]){display:none}#container #nav{display:flex;flex-grow:1;justify-content:end;align-items:center;gap:1rem}";
|
|
1191
|
+
var Se = Object.getOwnPropertyDescriptor, Ce = (s, t, e, i) => {
|
|
1192
|
+
for (var n = i > 1 ? void 0 : i ? Se(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1181
1193
|
(o = s[r]) && (n = o(n) || n);
|
|
1182
1194
|
return n;
|
|
1183
1195
|
};
|
|
@@ -1212,8 +1224,8 @@ let st = class extends g {
|
|
|
1212
1224
|
`;
|
|
1213
1225
|
}
|
|
1214
1226
|
};
|
|
1215
|
-
st.styles = [P(
|
|
1216
|
-
st =
|
|
1227
|
+
st.styles = [P(Ee)];
|
|
1228
|
+
st = Ce([
|
|
1217
1229
|
F("nte-navbar-line")
|
|
1218
1230
|
], st);
|
|
1219
1231
|
console.log("Loading nte-nav...");
|
package/lib/nte-navbar.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class NteNavbar extends LitElement {
|
|
|
11
11
|
constructor();
|
|
12
12
|
private updateScrollState;
|
|
13
13
|
connectedCallback(): Promise<void>;
|
|
14
|
-
updated(_changedProperties: PropertyValues): void
|
|
14
|
+
updated(_changedProperties: PropertyValues): Promise<void>;
|
|
15
15
|
firstUpdated(_changedProperties: PropertyValues): void;
|
|
16
16
|
render(): import('lit-html').TemplateResult<1>;
|
|
17
17
|
}
|