@nextrap/nte-nav 0.2.11 → 0.2.18
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 +41 -0
- package/index.css +1 -1
- package/index.js +271 -237
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
## 0.2.18 (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.17 (2025-07-21)
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated nte-offcanvas to 0.0.10
|
|
10
|
+
|
|
11
|
+
## 0.2.16 (2025-07-21)
|
|
12
|
+
|
|
13
|
+
### 🧱 Updated Dependencies
|
|
14
|
+
|
|
15
|
+
- Updated nte-offcanvas to 0.0.9
|
|
16
|
+
|
|
17
|
+
## 0.2.15 (2025-07-21)
|
|
18
|
+
|
|
19
|
+
### 🧱 Updated Dependencies
|
|
20
|
+
|
|
21
|
+
- Updated style-base to 1.0.1
|
|
22
|
+
- Updated nte-offcanvas to 0.0.8
|
|
23
|
+
|
|
24
|
+
## 0.2.14 (2025-07-21)
|
|
25
|
+
|
|
26
|
+
### 🧱 Updated Dependencies
|
|
27
|
+
|
|
28
|
+
- Updated style-base to 1.0.0
|
|
29
|
+
- Updated nte-offcanvas to 0.0.7
|
|
30
|
+
|
|
31
|
+
## 0.2.13 (2025-07-21)
|
|
32
|
+
|
|
33
|
+
### 🧱 Updated Dependencies
|
|
34
|
+
|
|
35
|
+
- Updated style-base to 0.0.2
|
|
36
|
+
- Updated nte-offcanvas to 0.0.6
|
|
37
|
+
|
|
38
|
+
## 0.2.12 (2025-07-21)
|
|
39
|
+
|
|
40
|
+
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
|
41
|
+
|
|
1
42
|
## 0.2.11 (2025-07-21)
|
|
2
43
|
|
|
3
44
|
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
|
|
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{--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>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.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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var zt = function(s, t, e, i) {
|
|
2
2
|
function n(r) {
|
|
3
3
|
return r instanceof e ? r : new e(function(o) {
|
|
4
4
|
o(r);
|
|
@@ -25,8 +25,8 @@ var Dt = function(s, t, e, i) {
|
|
|
25
25
|
d((i = i.apply(s, t || [])).next());
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function It() {
|
|
29
|
+
return zt(this, void 0, void 0, function* () {
|
|
30
30
|
return new Promise((s) => {
|
|
31
31
|
if (document.readyState === "complete" || document.readyState === "interactive")
|
|
32
32
|
return s("loaded");
|
|
@@ -34,7 +34,7 @@ function jt() {
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var Wt = function(s, t, e, i) {
|
|
38
38
|
function n(r) {
|
|
39
39
|
return r instanceof e ? r : new e(function(o) {
|
|
40
40
|
o(r);
|
|
@@ -61,14 +61,14 @@ var zt = function(s, t, e, i) {
|
|
|
61
61
|
d((i = i.apply(s, t || [])).next());
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
-
function
|
|
65
|
-
return
|
|
64
|
+
function dt(s) {
|
|
65
|
+
return Wt(this, void 0, void 0, function* () {
|
|
66
66
|
return new Promise((t) => {
|
|
67
67
|
window.setTimeout(() => t(), s);
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
class
|
|
71
|
+
class Ct {
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
74
|
* @param delay Debounce delay in milliseconds
|
|
@@ -90,7 +90,7 @@ class Et {
|
|
|
90
90
|
}, this.delay);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const T = {
|
|
94
94
|
xs: { name: "xs", minWidth: 0 },
|
|
95
95
|
sm: { name: "sm", minWidth: 576 },
|
|
96
96
|
md: { name: "md", minWidth: 768 },
|
|
@@ -98,39 +98,39 @@ const C = {
|
|
|
98
98
|
xl: { name: "xl", minWidth: 1200 },
|
|
99
99
|
xxl: { name: "xxl", minWidth: 1400 }
|
|
100
100
|
};
|
|
101
|
-
let
|
|
102
|
-
function
|
|
101
|
+
let O = T.xs;
|
|
102
|
+
function Z() {
|
|
103
103
|
const s = window.innerWidth;
|
|
104
|
-
let t =
|
|
105
|
-
for (const e in
|
|
106
|
-
const i =
|
|
104
|
+
let t = T.xs;
|
|
105
|
+
for (const e in T) {
|
|
106
|
+
const i = T[e];
|
|
107
107
|
s >= i.minWidth && (t = i);
|
|
108
108
|
}
|
|
109
109
|
return t;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function pt(s) {
|
|
112
112
|
if (typeof s == "string" && s.endsWith("px") && (s = parseInt(s.replace("px", ""))), typeof s == "string") {
|
|
113
|
-
if (s =
|
|
113
|
+
if (s = T[s], !s)
|
|
114
114
|
throw new Error(
|
|
115
|
-
`Breakpoint ${s} not found. Defined breakpoints are: ${Object.keys(
|
|
115
|
+
`Breakpoint ${s} not found. Defined breakpoints are: ${Object.keys(T).join(", ")}`
|
|
116
116
|
);
|
|
117
117
|
} else typeof s == "number" && (s = { name: "c", minWidth: s });
|
|
118
118
|
return window.innerWidth >= s.minWidth;
|
|
119
119
|
}
|
|
120
120
|
if (!window.__nextrap_current_breakpoint) {
|
|
121
|
-
window.__nextrap_current_breakpoint =
|
|
122
|
-
const s = new
|
|
121
|
+
window.__nextrap_current_breakpoint = Z();
|
|
122
|
+
const s = new Ct(200, 500);
|
|
123
123
|
window.addEventListener("resize", async () => {
|
|
124
|
-
if (await s.wait(),
|
|
125
|
-
|
|
124
|
+
if (await s.wait(), O !== Z()) {
|
|
125
|
+
O = Z(), window.__nextrap_current_breakpoint = O;
|
|
126
126
|
const t = new CustomEvent("breakpoint-changed", {
|
|
127
|
-
detail: { breakpoint:
|
|
127
|
+
detail: { breakpoint: O }
|
|
128
128
|
});
|
|
129
|
-
console.log("Breakpoint changed",
|
|
129
|
+
console.log("Breakpoint changed", O), window.dispatchEvent(t);
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
class
|
|
133
|
+
class rt {
|
|
134
134
|
/**
|
|
135
135
|
* Checks recursively if the element is visible.
|
|
136
136
|
*
|
|
@@ -175,12 +175,12 @@ class it {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Bt() {
|
|
179
179
|
return document.readyState === "loading" ? new Promise((s) => {
|
|
180
180
|
document.addEventListener("DOMContentLoaded", () => s());
|
|
181
181
|
}) : Promise.resolve();
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Gt() {
|
|
184
184
|
return document.readyState === "complete" ? Promise.resolve() : new Promise((s) => {
|
|
185
185
|
window.addEventListener("load", () => s());
|
|
186
186
|
});
|
|
@@ -190,18 +190,18 @@ function Wt() {
|
|
|
190
190
|
* Copyright 2019 Google LLC
|
|
191
191
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
192
192
|
*/
|
|
193
|
-
const
|
|
194
|
-
let
|
|
193
|
+
const B = globalThis, ot = B.ShadowRoot && (B.ShadyCSS === void 0 || B.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Tt = Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
194
|
+
let Pt = class {
|
|
195
195
|
constructor(t, e, i) {
|
|
196
|
-
if (this._$cssResult$ = !0, i !==
|
|
196
|
+
if (this._$cssResult$ = !0, i !== Tt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
197
197
|
this.cssText = t, this.t = e;
|
|
198
198
|
}
|
|
199
199
|
get styleSheet() {
|
|
200
200
|
let t = this.o;
|
|
201
201
|
const e = this.t;
|
|
202
|
-
if (
|
|
202
|
+
if (ot && t === void 0) {
|
|
203
203
|
const i = e !== void 0 && e.length === 1;
|
|
204
|
-
i && (t =
|
|
204
|
+
i && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ut.set(e, t));
|
|
205
205
|
}
|
|
206
206
|
return t;
|
|
207
207
|
}
|
|
@@ -209,26 +209,26 @@ let Ct = class {
|
|
|
209
209
|
return this.cssText;
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
|
-
const
|
|
213
|
-
if (
|
|
212
|
+
const C = (s) => new Pt(typeof s == "string" ? s : s + "", void 0, Tt), qt = (s, t) => {
|
|
213
|
+
if (ot) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
214
214
|
else for (const e of t) {
|
|
215
|
-
const i = document.createElement("style"), n =
|
|
215
|
+
const i = document.createElement("style"), n = B.litNonce;
|
|
216
216
|
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
|
|
217
217
|
}
|
|
218
|
-
},
|
|
218
|
+
}, ft = ot ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
219
219
|
let e = "";
|
|
220
220
|
for (const i of t.cssRules) e += i.cssText;
|
|
221
|
-
return
|
|
221
|
+
return C(e);
|
|
222
222
|
})(s) : s;
|
|
223
223
|
/**
|
|
224
224
|
* @license
|
|
225
225
|
* Copyright 2017 Google LLC
|
|
226
226
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
227
227
|
*/
|
|
228
|
-
const { is:
|
|
228
|
+
const { is: Vt, defineProperty: Yt, getOwnPropertyDescriptor: Ft, getOwnPropertyNames: Jt, getOwnPropertySymbols: Kt, getPrototypeOf: Zt } = Object, g = globalThis, vt = g.trustedTypes, Qt = vt ? vt.emptyScript : "", Q = g.reactiveElementPolyfillSupport, M = (s, t) => s, G = { toAttribute(s, t) {
|
|
229
229
|
switch (t) {
|
|
230
230
|
case Boolean:
|
|
231
|
-
s = s ?
|
|
231
|
+
s = s ? Qt : null;
|
|
232
232
|
break;
|
|
233
233
|
case Object:
|
|
234
234
|
case Array:
|
|
@@ -253,23 +253,23 @@ const { is: Gt, defineProperty: qt, getOwnPropertyDescriptor: Vt, getOwnProperty
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
return e;
|
|
256
|
-
} },
|
|
257
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
258
|
-
let
|
|
256
|
+
} }, at = (s, t) => !Vt(s, t), mt = { attribute: !0, type: String, converter: G, reflect: !1, useDefault: !1, hasChanged: at };
|
|
257
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), g.litPropertyMetadata ?? (g.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
258
|
+
let b = class extends HTMLElement {
|
|
259
259
|
static addInitializer(t) {
|
|
260
260
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
261
261
|
}
|
|
262
262
|
static get observedAttributes() {
|
|
263
263
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
264
264
|
}
|
|
265
|
-
static createProperty(t, e =
|
|
265
|
+
static createProperty(t, e = mt) {
|
|
266
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) {
|
|
267
267
|
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
|
268
|
-
n !== void 0 &&
|
|
268
|
+
n !== void 0 && Yt(this.prototype, t, n);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
static getPropertyDescriptor(t, e, i) {
|
|
272
|
-
const { get: n, set: r } =
|
|
272
|
+
const { get: n, set: r } = Ft(this.prototype, t) ?? { get() {
|
|
273
273
|
return this[e];
|
|
274
274
|
}, set(o) {
|
|
275
275
|
this[e] = o;
|
|
@@ -280,17 +280,17 @@ let y = class extends HTMLElement {
|
|
|
280
280
|
}, configurable: !0, enumerable: !0 };
|
|
281
281
|
}
|
|
282
282
|
static getPropertyOptions(t) {
|
|
283
|
-
return this.elementProperties.get(t) ??
|
|
283
|
+
return this.elementProperties.get(t) ?? mt;
|
|
284
284
|
}
|
|
285
285
|
static _$Ei() {
|
|
286
286
|
if (this.hasOwnProperty(M("elementProperties"))) return;
|
|
287
|
-
const t =
|
|
287
|
+
const t = Zt(this);
|
|
288
288
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
289
289
|
}
|
|
290
290
|
static finalize() {
|
|
291
291
|
if (this.hasOwnProperty(M("finalized"))) return;
|
|
292
292
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
|
293
|
-
const e = this.properties, i = [...
|
|
293
|
+
const e = this.properties, i = [...Jt(e), ...Kt(e)];
|
|
294
294
|
for (const n of i) this.createProperty(n, e[n]);
|
|
295
295
|
}
|
|
296
296
|
const t = this[Symbol.metadata];
|
|
@@ -309,8 +309,8 @@ let y = class extends HTMLElement {
|
|
|
309
309
|
const e = [];
|
|
310
310
|
if (Array.isArray(t)) {
|
|
311
311
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
312
|
-
for (const n of i) e.unshift(
|
|
313
|
-
} else t !== void 0 && e.push(
|
|
312
|
+
for (const n of i) e.unshift(ft(n));
|
|
313
|
+
} else t !== void 0 && e.push(ft(t));
|
|
314
314
|
return e;
|
|
315
315
|
}
|
|
316
316
|
static _$Eu(t, e) {
|
|
@@ -339,7 +339,7 @@ let y = class extends HTMLElement {
|
|
|
339
339
|
}
|
|
340
340
|
createRenderRoot() {
|
|
341
341
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
342
|
-
return
|
|
342
|
+
return qt(t, this.constructor.elementStyles), t;
|
|
343
343
|
}
|
|
344
344
|
connectedCallback() {
|
|
345
345
|
var t;
|
|
@@ -364,7 +364,7 @@ let y = class extends HTMLElement {
|
|
|
364
364
|
var r;
|
|
365
365
|
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
|
366
366
|
if (n !== void 0 && i.reflect === !0) {
|
|
367
|
-
const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter :
|
|
367
|
+
const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : G).toAttribute(e, i.type);
|
|
368
368
|
this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
@@ -372,7 +372,7 @@ let y = class extends HTMLElement {
|
|
|
372
372
|
var r, o;
|
|
373
373
|
const i = this.constructor, n = i._$Eh.get(t);
|
|
374
374
|
if (n !== void 0 && this._$Em !== n) {
|
|
375
|
-
const l = i.getPropertyOptions(n), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((r = l.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? l.converter :
|
|
375
|
+
const l = i.getPropertyOptions(n), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((r = l.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? l.converter : G;
|
|
376
376
|
this._$Em = n;
|
|
377
377
|
const d = a.fromAttribute(e, l.type);
|
|
378
378
|
this[n] = d ?? ((o = this._$Ej) == null ? void 0 : o.get(n)) ?? d, this._$Em = null;
|
|
@@ -382,7 +382,7 @@ let y = class extends HTMLElement {
|
|
|
382
382
|
var n;
|
|
383
383
|
if (t !== void 0) {
|
|
384
384
|
const r = this.constructor, o = this[t];
|
|
385
|
-
if (i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ??
|
|
385
|
+
if (i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ?? at)(o, e) || i.useDefault && i.reflect && o === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
386
386
|
this.C(t, e, i);
|
|
387
387
|
}
|
|
388
388
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -458,76 +458,76 @@ let y = class extends HTMLElement {
|
|
|
458
458
|
firstUpdated(t) {
|
|
459
459
|
}
|
|
460
460
|
};
|
|
461
|
-
|
|
461
|
+
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[M("elementProperties")] = /* @__PURE__ */ new Map(), b[M("finalized")] = /* @__PURE__ */ new Map(), Q == null || Q({ ReactiveElement: b }), (g.reactiveElementVersions ?? (g.reactiveElementVersions = [])).push("2.1.1");
|
|
462
462
|
/**
|
|
463
463
|
* @license
|
|
464
464
|
* Copyright 2017 Google LLC
|
|
465
465
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
466
466
|
*/
|
|
467
|
-
const U = globalThis,
|
|
468
|
-
\f\r]`,
|
|
469
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
470
|
-
function
|
|
471
|
-
if (!
|
|
472
|
-
return
|
|
467
|
+
const U = globalThis, q = U.trustedTypes, gt = q ? q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Ot = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, kt = "?" + m, Xt = `<${kt}>`, E = document, H = () => E.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", lt = Array.isArray, te = (s) => lt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", X = `[
|
|
468
|
+
\f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _t = /-->/g, $t = />/g, y = RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
|
|
469
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), yt = /'/g, bt = /"/g, Mt = /^(?:script|style|textarea|title)$/i, ee = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = ee(1), S = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), wt = /* @__PURE__ */ new WeakMap(), w = E.createTreeWalker(E, 129);
|
|
470
|
+
function Ut(s, t) {
|
|
471
|
+
if (!lt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
472
|
+
return gt !== void 0 ? gt.createHTML(t) : t;
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const se = (s, t) => {
|
|
475
475
|
const e = s.length - 1, i = [];
|
|
476
|
-
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
476
|
+
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = k;
|
|
477
477
|
for (let l = 0; l < e; l++) {
|
|
478
478
|
const a = s[l];
|
|
479
479
|
let d, h, c = -1, u = 0;
|
|
480
|
-
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o ===
|
|
481
|
-
const
|
|
482
|
-
r += o ===
|
|
480
|
+
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o === k ? h[1] === "!--" ? o = _t : h[1] !== void 0 ? o = $t : h[2] !== void 0 ? (Mt.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = y) : h[3] !== void 0 && (o = y) : o === y ? h[0] === ">" ? (o = n ?? k, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, d = h[1], o = h[3] === void 0 ? y : h[3] === '"' ? bt : yt) : o === bt || o === yt ? o = y : o === _t || o === $t ? o = k : (o = y, n = void 0);
|
|
481
|
+
const v = o === y && s[l + 1].startsWith("/>") ? " " : "";
|
|
482
|
+
r += o === k ? a + Xt : c >= 0 ? (i.push(d), a.slice(0, c) + Ot + a.slice(c) + m + v) : a + m + (c === -2 ? l : v);
|
|
483
483
|
}
|
|
484
|
-
return [
|
|
484
|
+
return [Ut(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
485
485
|
};
|
|
486
486
|
class D {
|
|
487
487
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
488
488
|
let n;
|
|
489
489
|
this.parts = [];
|
|
490
490
|
let r = 0, o = 0;
|
|
491
|
-
const l = t.length - 1, a = this.parts, [d, h] =
|
|
492
|
-
if (this.el = D.createElement(d, i),
|
|
491
|
+
const l = t.length - 1, a = this.parts, [d, h] = se(t, e);
|
|
492
|
+
if (this.el = D.createElement(d, i), w.currentNode = this.el.content, e === 2 || e === 3) {
|
|
493
493
|
const c = this.el.content.firstChild;
|
|
494
494
|
c.replaceWith(...c.childNodes);
|
|
495
495
|
}
|
|
496
|
-
for (; (n =
|
|
496
|
+
for (; (n = w.nextNode()) !== null && a.length < l; ) {
|
|
497
497
|
if (n.nodeType === 1) {
|
|
498
|
-
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(
|
|
499
|
-
const u = h[o++],
|
|
500
|
-
a.push({ type: 1, index: r, name:
|
|
501
|
-
} else c.startsWith(
|
|
502
|
-
if (
|
|
503
|
-
const c = n.textContent.split(
|
|
498
|
+
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(Ot)) {
|
|
499
|
+
const u = h[o++], v = n.getAttribute(c).split(m), W = /([.?@])?(.*)/.exec(u);
|
|
500
|
+
a.push({ type: 1, index: r, name: W[2], strings: v, ctor: W[1] === "." ? ne : W[1] === "?" ? re : W[1] === "@" ? oe : J }), n.removeAttribute(c);
|
|
501
|
+
} else c.startsWith(m) && (a.push({ type: 6, index: r }), n.removeAttribute(c));
|
|
502
|
+
if (Mt.test(n.tagName)) {
|
|
503
|
+
const c = n.textContent.split(m), u = c.length - 1;
|
|
504
504
|
if (u > 0) {
|
|
505
|
-
n.textContent =
|
|
506
|
-
for (let
|
|
505
|
+
n.textContent = q ? q.emptyScript : "";
|
|
506
|
+
for (let v = 0; v < u; v++) n.append(c[v], H()), w.nextNode(), a.push({ type: 2, index: ++r });
|
|
507
507
|
n.append(c[u], H());
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
} else if (n.nodeType === 8) if (n.data ===
|
|
510
|
+
} else if (n.nodeType === 8) if (n.data === kt) a.push({ type: 2, index: r });
|
|
511
511
|
else {
|
|
512
512
|
let c = -1;
|
|
513
|
-
for (; (c = n.data.indexOf(
|
|
513
|
+
for (; (c = n.data.indexOf(m, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += m.length - 1;
|
|
514
514
|
}
|
|
515
515
|
r++;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
static createElement(t, e) {
|
|
519
|
-
const i =
|
|
519
|
+
const i = E.createElement("template");
|
|
520
520
|
return i.innerHTML = t, i;
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function P(s, t, e = s, i) {
|
|
524
524
|
var o, l;
|
|
525
|
-
if (t ===
|
|
525
|
+
if (t === S) return t;
|
|
526
526
|
let n = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
|
527
527
|
const r = L(t) ? void 0 : t._$litDirective$;
|
|
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 =
|
|
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 = P(s, n._$AS(s, t.values), n, i)), t;
|
|
529
529
|
}
|
|
530
|
-
class
|
|
530
|
+
class ie {
|
|
531
531
|
constructor(t, e) {
|
|
532
532
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
533
533
|
}
|
|
@@ -538,17 +538,17 @@ class ee {
|
|
|
538
538
|
return this._$AM._$AU;
|
|
539
539
|
}
|
|
540
540
|
u(t) {
|
|
541
|
-
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ??
|
|
542
|
-
|
|
543
|
-
let r =
|
|
541
|
+
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? E).importNode(e, !0);
|
|
542
|
+
w.currentNode = n;
|
|
543
|
+
let r = w.nextNode(), o = 0, l = 0, a = i[0];
|
|
544
544
|
for (; a !== void 0; ) {
|
|
545
545
|
if (o === a.index) {
|
|
546
546
|
let d;
|
|
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
|
|
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 ae(r, this, t)), this._$AV.push(d), a = i[++l];
|
|
548
548
|
}
|
|
549
|
-
o !== (a == null ? void 0 : a.index) && (r =
|
|
549
|
+
o !== (a == null ? void 0 : a.index) && (r = w.nextNode(), o++);
|
|
550
550
|
}
|
|
551
|
-
return
|
|
551
|
+
return w.currentNode = E, n;
|
|
552
552
|
}
|
|
553
553
|
p(t) {
|
|
554
554
|
let e = 0;
|
|
@@ -575,7 +575,7 @@ class j {
|
|
|
575
575
|
return this._$AB;
|
|
576
576
|
}
|
|
577
577
|
_$AI(t, e = this) {
|
|
578
|
-
t =
|
|
578
|
+
t = P(this, t, e), L(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : te(t) ? this.k(t) : this._(t);
|
|
579
579
|
}
|
|
580
580
|
O(t) {
|
|
581
581
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -584,23 +584,23 @@ class j {
|
|
|
584
584
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
585
585
|
}
|
|
586
586
|
_(t) {
|
|
587
|
-
this._$AH !== p && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
587
|
+
this._$AH !== p && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(E.createTextNode(t)), this._$AH = t;
|
|
588
588
|
}
|
|
589
589
|
$(t) {
|
|
590
590
|
var r;
|
|
591
|
-
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(
|
|
591
|
+
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(Ut(i.h, i.h[0]), this.options)), i);
|
|
592
592
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
593
593
|
else {
|
|
594
|
-
const o = new
|
|
594
|
+
const o = new ie(n, this), l = o.u(this.options);
|
|
595
595
|
o.p(e), this.T(l), this._$AH = o;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
_$AC(t) {
|
|
599
|
-
let e =
|
|
600
|
-
return e === void 0 &&
|
|
599
|
+
let e = wt.get(t.strings);
|
|
600
|
+
return e === void 0 && wt.set(t.strings, e = new D(t)), e;
|
|
601
601
|
}
|
|
602
602
|
k(t) {
|
|
603
|
-
|
|
603
|
+
lt(this._$AH) || (this._$AH = [], this._$AR());
|
|
604
604
|
const e = this._$AH;
|
|
605
605
|
let i, n = 0;
|
|
606
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++;
|
|
@@ -618,7 +618,7 @@ class j {
|
|
|
618
618
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
class
|
|
621
|
+
class J {
|
|
622
622
|
get tagName() {
|
|
623
623
|
return this.element.tagName;
|
|
624
624
|
}
|
|
@@ -631,11 +631,11 @@ class Y {
|
|
|
631
631
|
_$AI(t, e = this, i, n) {
|
|
632
632
|
const r = this.strings;
|
|
633
633
|
let o = !1;
|
|
634
|
-
if (r === void 0) t =
|
|
634
|
+
if (r === void 0) t = P(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== S, o && (this._$AH = t);
|
|
635
635
|
else {
|
|
636
636
|
const l = t;
|
|
637
637
|
let a, d;
|
|
638
|
-
for (t = r[0], a = 0; a < r.length - 1; a++) d =
|
|
638
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) d = P(this, l[i + a], e, a), d === S && (d = this._$AH[a]), o || (o = !L(d) || d !== this._$AH[a]), d === p ? t = p : t !== p && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
|
|
639
639
|
}
|
|
640
640
|
o && !n && this.j(t);
|
|
641
641
|
}
|
|
@@ -643,7 +643,7 @@ class Y {
|
|
|
643
643
|
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
-
class
|
|
646
|
+
class ne extends J {
|
|
647
647
|
constructor() {
|
|
648
648
|
super(...arguments), this.type = 3;
|
|
649
649
|
}
|
|
@@ -651,7 +651,7 @@ class se extends Y {
|
|
|
651
651
|
this.element[this.name] = t === p ? void 0 : t;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
class
|
|
654
|
+
class re extends J {
|
|
655
655
|
constructor() {
|
|
656
656
|
super(...arguments), this.type = 4;
|
|
657
657
|
}
|
|
@@ -659,12 +659,12 @@ class ie extends Y {
|
|
|
659
659
|
this.element.toggleAttribute(this.name, !!t && t !== p);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
class
|
|
662
|
+
class oe extends J {
|
|
663
663
|
constructor(t, e, i, n, r) {
|
|
664
664
|
super(t, e, i, n, r), this.type = 5;
|
|
665
665
|
}
|
|
666
666
|
_$AI(t, e = this) {
|
|
667
|
-
if ((t =
|
|
667
|
+
if ((t = P(this, t, e, 0) ?? p) === S) return;
|
|
668
668
|
const i = this._$AH, n = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== p && (i === p || n);
|
|
669
669
|
n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
670
670
|
}
|
|
@@ -673,7 +673,7 @@ class ne extends Y {
|
|
|
673
673
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
class
|
|
676
|
+
class ae {
|
|
677
677
|
constructor(t, e, i) {
|
|
678
678
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
679
679
|
}
|
|
@@ -681,12 +681,12 @@ class re {
|
|
|
681
681
|
return this._$AM._$AU;
|
|
682
682
|
}
|
|
683
683
|
_$AI(t) {
|
|
684
|
-
|
|
684
|
+
P(this, t);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
const
|
|
687
|
+
const tt = U.litHtmlPolyfillSupport;
|
|
688
|
+
tt == null || tt(D, j), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.3.1");
|
|
689
|
+
const le = (s, t, e) => {
|
|
690
690
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
691
691
|
let n = i._$litPart$;
|
|
692
692
|
if (n === void 0) {
|
|
@@ -700,8 +700,8 @@ const oe = (s, t, e) => {
|
|
|
700
700
|
* Copyright 2017 Google LLC
|
|
701
701
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
702
702
|
*/
|
|
703
|
-
const
|
|
704
|
-
let
|
|
703
|
+
const A = globalThis;
|
|
704
|
+
let _ = class extends b {
|
|
705
705
|
constructor() {
|
|
706
706
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
707
707
|
}
|
|
@@ -712,7 +712,7 @@ let g = class extends y {
|
|
|
712
712
|
}
|
|
713
713
|
update(t) {
|
|
714
714
|
const e = this.render();
|
|
715
|
-
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 = le(e, this.renderRoot, this.renderOptions);
|
|
716
716
|
}
|
|
717
717
|
connectedCallback() {
|
|
718
718
|
var t;
|
|
@@ -723,20 +723,20 @@ let g = class extends y {
|
|
|
723
723
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
724
724
|
}
|
|
725
725
|
render() {
|
|
726
|
-
return
|
|
726
|
+
return S;
|
|
727
727
|
}
|
|
728
728
|
};
|
|
729
|
-
var
|
|
730
|
-
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
(
|
|
729
|
+
var St;
|
|
730
|
+
_._$litElement$ = !0, _.finalized = !0, (St = A.litElementHydrateSupport) == null || St.call(A, { LitElement: _ });
|
|
731
|
+
const et = A.litElementPolyfillSupport;
|
|
732
|
+
et == null || et({ LitElement: _ });
|
|
733
|
+
(A.litElementVersions ?? (A.litElementVersions = [])).push("4.2.1");
|
|
734
734
|
/**
|
|
735
735
|
* @license
|
|
736
736
|
* Copyright 2017 Google LLC
|
|
737
737
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
738
738
|
*/
|
|
739
|
-
const
|
|
739
|
+
const z = (s) => (t, e) => {
|
|
740
740
|
e !== void 0 ? e.addInitializer(() => {
|
|
741
741
|
customElements.define(s, t);
|
|
742
742
|
}) : customElements.define(s, t);
|
|
@@ -746,7 +746,7 @@ const F = (s) => (t, e) => {
|
|
|
746
746
|
* Copyright 2017 Google LLC
|
|
747
747
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
748
748
|
*/
|
|
749
|
-
const
|
|
749
|
+
const he = { attribute: !0, type: String, converter: G, reflect: !1, hasChanged: at }, ce = (s = he, t, e) => {
|
|
750
750
|
const { kind: i, metadata: n } = e;
|
|
751
751
|
let r = globalThis.litPropertyMetadata.get(n);
|
|
752
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") {
|
|
@@ -767,8 +767,8 @@ const ae = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged:
|
|
|
767
767
|
}
|
|
768
768
|
throw Error("Unsupported decorator location: " + i);
|
|
769
769
|
};
|
|
770
|
-
function
|
|
771
|
-
return (t, e) => typeof e == "object" ?
|
|
770
|
+
function f(s) {
|
|
771
|
+
return (t, e) => typeof e == "object" ? ce(s, t, e) : ((i, n, r) => {
|
|
772
772
|
const o = n.hasOwnProperty(r);
|
|
773
773
|
return n.constructor.createProperty(r, i), o ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
774
774
|
})(s, t, e);
|
|
@@ -778,10 +778,10 @@ function S(s) {
|
|
|
778
778
|
* Copyright 2017 Google LLC
|
|
779
779
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
780
780
|
*/
|
|
781
|
-
function
|
|
782
|
-
return
|
|
781
|
+
function Nt(s) {
|
|
782
|
+
return f({ ...s, state: !0, attribute: !1 });
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function de(s, t) {
|
|
785
785
|
const e = document.createElement("template");
|
|
786
786
|
return e.innerHTML = s.trim(), t.append(e.content.cloneNode(!0)), new Proxy({}, {
|
|
787
787
|
get(i, n) {
|
|
@@ -796,32 +796,32 @@ function he(s, t) {
|
|
|
796
796
|
}
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
|
-
const
|
|
799
|
+
const ct = class ct extends b {
|
|
800
800
|
constructor(t) {
|
|
801
801
|
super();
|
|
802
802
|
const e = this.createRenderRoot();
|
|
803
|
-
this.$ =
|
|
803
|
+
this.$ = de(t, e);
|
|
804
804
|
}
|
|
805
805
|
connectedCallback() {
|
|
806
806
|
super.connectedCallback();
|
|
807
807
|
let t = this.css;
|
|
808
808
|
Array.isArray(t) || (t = [t]);
|
|
809
|
-
const e = t.map((i) => i instanceof
|
|
809
|
+
const e = t.map((i) => i instanceof Pt ? i.styleSheet : C(i).styleSheet);
|
|
810
810
|
this.shadowRoot.adoptedStyleSheets = e;
|
|
811
811
|
}
|
|
812
812
|
};
|
|
813
|
-
|
|
813
|
+
ct.DEFINITION = {
|
|
814
814
|
classes: [],
|
|
815
815
|
attributes: {}
|
|
816
816
|
};
|
|
817
|
-
let
|
|
817
|
+
let it = ct;
|
|
818
818
|
/**
|
|
819
819
|
* @license
|
|
820
820
|
* Copyright 2017 Google LLC
|
|
821
821
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
822
822
|
*/
|
|
823
|
-
const
|
|
824
|
-
class
|
|
823
|
+
const Ht = { ATTRIBUTE: 1, CHILD: 2 }, Lt = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
|
824
|
+
class Rt {
|
|
825
825
|
constructor(t) {
|
|
826
826
|
}
|
|
827
827
|
get _$AU() {
|
|
@@ -842,10 +842,10 @@ class Ht {
|
|
|
842
842
|
* Copyright 2018 Google LLC
|
|
843
843
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
844
844
|
*/
|
|
845
|
-
const
|
|
845
|
+
const At = Lt(class extends Rt {
|
|
846
846
|
constructor(s) {
|
|
847
847
|
var t;
|
|
848
|
-
if (super(s), s.type !==
|
|
848
|
+
if (super(s), s.type !== Ht.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.");
|
|
849
849
|
}
|
|
850
850
|
render(s) {
|
|
851
851
|
return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
|
|
@@ -863,15 +863,15 @@ const bt = Nt(class extends Ht {
|
|
|
863
863
|
const o = !!t[r];
|
|
864
864
|
o === this.st.has(r) || (n = this.nt) != null && n.has(r) || (o ? (e.add(r), this.st.add(r)) : (e.remove(r), this.st.delete(r)));
|
|
865
865
|
}
|
|
866
|
-
return
|
|
866
|
+
return S;
|
|
867
867
|
}
|
|
868
|
-
}),
|
|
869
|
-
var
|
|
870
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
868
|
+
}), pe = "*,*: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: transparent;--background-color: var(--nt-soft-primary);--shadow-color: rgba(var(--nt-dark-rgb), .5);--main-padding: 0;--header-padding: var(--nt-space);position:fixed;top:0;right:0;height:100vh;width:50%;min-width:250px;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%;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(--header-padding)}#header:has(>slot[empty]){display:none}#main{display:flex;width:100%;flex-grow:1;padding:var(--main-padding);min-height:200px;overflow:auto;scroll-behavior:auto;scrollbar-gutter:stable;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 ue = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, K = (s, t, e, i) => {
|
|
870
|
+
for (var n = i > 1 ? void 0 : i ? fe(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
871
871
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
872
|
-
return i && n &&
|
|
872
|
+
return i && n && ue(t, e, n), n;
|
|
873
873
|
};
|
|
874
|
-
let
|
|
874
|
+
let x = class extends _ {
|
|
875
875
|
constructor() {
|
|
876
876
|
super(), this.backdrop = !0, this.opened = !1, this.closedClass = !0, this.addEventListener("click", (s) => {
|
|
877
877
|
s === void 0 || !s.target || !(s.target instanceof HTMLElement) || s.target.closest("[data-nt-dismiss='offcanvas']") !== null && this.close();
|
|
@@ -893,7 +893,7 @@ let A = class extends g {
|
|
|
893
893
|
this.opened = !this.opened;
|
|
894
894
|
}
|
|
895
895
|
async updated(s) {
|
|
896
|
-
s.has("opened") && (this.opened ? (this.style.display = "block", await
|
|
896
|
+
s.has("opened") && (this.opened ? (this.style.display = "block", await dt(1), rt.observeEmptySlots(this), this.closedClass = !1) : (this.closedClass = !0, await dt(400), this.style.display = "none"));
|
|
897
897
|
}
|
|
898
898
|
render() {
|
|
899
899
|
return R`
|
|
@@ -901,14 +901,14 @@ let A = class extends g {
|
|
|
901
901
|
id="backdrop"
|
|
902
902
|
part="backdrop"
|
|
903
903
|
@click=${() => this.opened = !1}
|
|
904
|
-
class=${
|
|
904
|
+
class=${At({ closed: this.closedClass })}
|
|
905
905
|
></div>
|
|
906
906
|
<div
|
|
907
907
|
id="offcanvas"
|
|
908
908
|
part="offcanvas"
|
|
909
909
|
role="dialog"
|
|
910
910
|
aria-modal="true"
|
|
911
|
-
class=${
|
|
911
|
+
class=${At({ closed: this.closedClass })}
|
|
912
912
|
?backdrop="${this.backdrop}"
|
|
913
913
|
>
|
|
914
914
|
<div id="header">
|
|
@@ -926,26 +926,26 @@ let A = class extends g {
|
|
|
926
926
|
`;
|
|
927
927
|
}
|
|
928
928
|
};
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
],
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
],
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
],
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
],
|
|
942
|
-
const
|
|
943
|
-
var
|
|
944
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
929
|
+
x.styles = [C(pe)];
|
|
930
|
+
K([
|
|
931
|
+
f({ type: Boolean, reflect: !0 })
|
|
932
|
+
], x.prototype, "backdrop", 2);
|
|
933
|
+
K([
|
|
934
|
+
f({ type: Boolean, reflect: !0 })
|
|
935
|
+
], x.prototype, "opened", 2);
|
|
936
|
+
K([
|
|
937
|
+
Nt()
|
|
938
|
+
], x.prototype, "closedClass", 2);
|
|
939
|
+
x = K([
|
|
940
|
+
z(x.is)
|
|
941
|
+
], x);
|
|
942
|
+
const ve = ":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%}#burger-wrapper{padding:15px}";
|
|
943
|
+
var me = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, I = (s, t, e, i) => {
|
|
944
|
+
for (var n = i > 1 ? void 0 : i ? ge(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
945
945
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
946
|
-
return i && n &&
|
|
946
|
+
return i && n && me(t, e, n), n;
|
|
947
947
|
};
|
|
948
|
-
let $ = class extends
|
|
948
|
+
let $ = class extends _ {
|
|
949
949
|
constructor() {
|
|
950
950
|
super(), this.mode = "slave", this.breakpoint = "99999px", this.transferTo = "", this._isTransferred = !1;
|
|
951
951
|
}
|
|
@@ -958,24 +958,26 @@ let $ = class extends g {
|
|
|
958
958
|
}
|
|
959
959
|
render() {
|
|
960
960
|
return R` <nav>
|
|
961
|
-
<
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
961
|
+
<div id="burger-wrapper" ?hidden=${!this._isTransferred}>
|
|
962
|
+
<slot
|
|
963
|
+
name="burger"
|
|
964
|
+
open
|
|
965
|
+
aria-haspopup="true"
|
|
966
|
+
id="burger"
|
|
967
|
+
class="burger"
|
|
968
|
+
@click=${() => {
|
|
969
969
|
var s;
|
|
970
970
|
return (s = this.getOffcanvas()) == null ? void 0 : s.open();
|
|
971
971
|
}}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
972
|
+
>
|
|
973
|
+
<!-- fallback icon -->
|
|
974
|
+
${this._isTransferred ? R`<div style="display:flex; align-items: center; justify-content: center;">
|
|
975
|
+
<div id="text"><slot name="menu-text"></slot></div>
|
|
976
|
+
<nte-burger id="open-burger"></nte-burger>
|
|
977
|
+
</div>` : ""}
|
|
978
|
+
</slot>
|
|
979
|
+
</div>
|
|
980
|
+
|
|
979
981
|
<div class="nt-nav-links" id="main" part="main">
|
|
980
982
|
<slot id="main-slot"></slot>
|
|
981
983
|
</div>
|
|
@@ -1004,8 +1006,8 @@ let $ = class extends g {
|
|
|
1004
1006
|
!t.contains("nav-vertical") && !t.contains("nav-horizontal") && t.add(this.closest("nte-offcanvas") === null ? "nav-horizontal" : "nav-vertical");
|
|
1005
1007
|
}
|
|
1006
1008
|
async connectedCallback() {
|
|
1007
|
-
await
|
|
1008
|
-
|
|
1009
|
+
await It(), super.connectedCallback(), this.mode !== "slave" && this.transferTo !== "" && (this._isTransferred = !1, this.breakpoint !== "" && (pt(this.breakpoint) || (this._isTransferred = !0), window.addEventListener("breakpoint-changed", (s) => {
|
|
1010
|
+
pt(this.breakpoint) ? this._isTransferred = !1 : this._isTransferred = !0;
|
|
1009
1011
|
})));
|
|
1010
1012
|
}
|
|
1011
1013
|
};
|
|
@@ -1013,28 +1015,28 @@ $.DEFINITION = {
|
|
|
1013
1015
|
classes: ["align-left", "align-right", "align-center"],
|
|
1014
1016
|
attributes: {}
|
|
1015
1017
|
};
|
|
1016
|
-
$.styles = [
|
|
1017
|
-
|
|
1018
|
-
|
|
1018
|
+
$.styles = [C(ve)];
|
|
1019
|
+
I([
|
|
1020
|
+
f({ type: String, reflect: !0 })
|
|
1019
1021
|
], $.prototype, "mode", 2);
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
+
I([
|
|
1023
|
+
f({ type: String, reflect: !0 })
|
|
1022
1024
|
], $.prototype, "breakpoint", 2);
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
+
I([
|
|
1026
|
+
f({ type: String, reflect: !0, attribute: "transfer-to" })
|
|
1025
1027
|
], $.prototype, "transferTo", 2);
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
+
I([
|
|
1029
|
+
Nt()
|
|
1028
1030
|
], $.prototype, "_isTransferred", 2);
|
|
1029
|
-
$ =
|
|
1030
|
-
|
|
1031
|
+
$ = I([
|
|
1032
|
+
z("nte-nav")
|
|
1031
1033
|
], $);
|
|
1032
1034
|
/**
|
|
1033
1035
|
* @license
|
|
1034
1036
|
* Copyright 2020 Google LLC
|
|
1035
1037
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1036
1038
|
*/
|
|
1037
|
-
const
|
|
1039
|
+
const _e = (s) => s.strings === void 0;
|
|
1038
1040
|
/**
|
|
1039
1041
|
* @license
|
|
1040
1042
|
* Copyright 2017 Google LLC
|
|
@@ -1046,45 +1048,45 @@ const N = (s, t) => {
|
|
|
1046
1048
|
if (e === void 0) return !1;
|
|
1047
1049
|
for (const n of e) (i = n._$AO) == null || i.call(n, t, !1), N(n, t);
|
|
1048
1050
|
return !0;
|
|
1049
|
-
},
|
|
1051
|
+
}, V = (s) => {
|
|
1050
1052
|
let t, e;
|
|
1051
1053
|
do {
|
|
1052
1054
|
if ((t = s._$AM) === void 0) break;
|
|
1053
1055
|
e = t._$AN, e.delete(s), s = t;
|
|
1054
1056
|
} while ((e == null ? void 0 : e.size) === 0);
|
|
1055
|
-
},
|
|
1057
|
+
}, Dt = (s) => {
|
|
1056
1058
|
for (let t; t = s._$AM; s = t) {
|
|
1057
1059
|
let e = t._$AN;
|
|
1058
1060
|
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
|
1059
1061
|
else if (e.has(s)) break;
|
|
1060
|
-
e.add(s),
|
|
1062
|
+
e.add(s), be(t);
|
|
1061
1063
|
}
|
|
1062
1064
|
};
|
|
1063
|
-
function
|
|
1064
|
-
this._$AN !== void 0 ? (
|
|
1065
|
+
function $e(s) {
|
|
1066
|
+
this._$AN !== void 0 ? (V(this), this._$AM = s, Dt(this)) : this._$AM = s;
|
|
1065
1067
|
}
|
|
1066
|
-
function
|
|
1068
|
+
function ye(s, t = !1, e = 0) {
|
|
1067
1069
|
const i = this._$AH, n = this._$AN;
|
|
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),
|
|
1069
|
-
else i != null && (N(i, !1),
|
|
1070
|
+
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), V(i[r]);
|
|
1071
|
+
else i != null && (N(i, !1), V(i));
|
|
1070
1072
|
else N(this, s);
|
|
1071
1073
|
}
|
|
1072
|
-
const
|
|
1073
|
-
s.type ==
|
|
1074
|
+
const be = (s) => {
|
|
1075
|
+
s.type == Ht.CHILD && (s._$AP ?? (s._$AP = ye), s._$AQ ?? (s._$AQ = $e));
|
|
1074
1076
|
};
|
|
1075
|
-
class
|
|
1077
|
+
class we extends Rt {
|
|
1076
1078
|
constructor() {
|
|
1077
1079
|
super(...arguments), this._$AN = void 0;
|
|
1078
1080
|
}
|
|
1079
1081
|
_$AT(t, e, i) {
|
|
1080
|
-
super._$AT(t, e, i),
|
|
1082
|
+
super._$AT(t, e, i), Dt(this), this.isConnected = t._$AU;
|
|
1081
1083
|
}
|
|
1082
1084
|
_$AO(t, e = !0) {
|
|
1083
1085
|
var i, n;
|
|
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),
|
|
1086
|
+
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), V(this));
|
|
1085
1087
|
}
|
|
1086
1088
|
setValue(t) {
|
|
1087
|
-
if (
|
|
1089
|
+
if (_e(this._$Ct)) this._$Ct._$AI(t, this);
|
|
1088
1090
|
else {
|
|
1089
1091
|
const e = [...this._$Ct._$AH];
|
|
1090
1092
|
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
@@ -1100,10 +1102,10 @@ class ye extends Ht {
|
|
|
1100
1102
|
* Copyright 2020 Google LLC
|
|
1101
1103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1102
1104
|
*/
|
|
1103
|
-
const
|
|
1104
|
-
class
|
|
1105
|
+
const xt = () => new Ae();
|
|
1106
|
+
class Ae {
|
|
1105
1107
|
}
|
|
1106
|
-
const
|
|
1108
|
+
const st = /* @__PURE__ */ new WeakMap(), Et = Lt(class extends we {
|
|
1107
1109
|
render(s) {
|
|
1108
1110
|
return p;
|
|
1109
1111
|
}
|
|
@@ -1115,13 +1117,13 @@ const et = /* @__PURE__ */ new WeakMap(), At = Nt(class extends ye {
|
|
|
1115
1117
|
rt(s) {
|
|
1116
1118
|
if (this.isConnected || (s = void 0), typeof this.G == "function") {
|
|
1117
1119
|
const t = this.ht ?? globalThis;
|
|
1118
|
-
let e =
|
|
1119
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(),
|
|
1120
|
+
let e = st.get(t);
|
|
1121
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), st.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ht, void 0), e.set(this.G, s), s !== void 0 && this.G.call(this.ht, s);
|
|
1120
1122
|
} else this.G.value = s;
|
|
1121
1123
|
}
|
|
1122
1124
|
get lt() {
|
|
1123
1125
|
var s, t;
|
|
1124
|
-
return typeof this.G == "function" ? (s =
|
|
1126
|
+
return typeof this.G == "function" ? (s = st.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
1125
1127
|
}
|
|
1126
1128
|
disconnected() {
|
|
1127
1129
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -1129,15 +1131,15 @@ const et = /* @__PURE__ */ new WeakMap(), At = Nt(class extends ye {
|
|
|
1129
1131
|
reconnected() {
|
|
1130
1132
|
this.rt(this.ct);
|
|
1131
1133
|
}
|
|
1132
|
-
}),
|
|
1133
|
-
var
|
|
1134
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
1134
|
+
}), xe = "*,*: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;width:100vw;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:100vw;height:auto;background-color:var(--bg);z-index:1000}#main{width:100vw;display:block}";
|
|
1135
|
+
var Ee = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, jt = (s, t, e, i) => {
|
|
1136
|
+
for (var n = i > 1 ? void 0 : i ? Se(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1135
1137
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
1136
|
-
return i && n &&
|
|
1138
|
+
return i && n && Ee(t, e, n), n;
|
|
1137
1139
|
};
|
|
1138
|
-
let
|
|
1140
|
+
let Y = class extends _ {
|
|
1139
1141
|
constructor() {
|
|
1140
|
-
super(), this.navbarRef =
|
|
1142
|
+
super(), this.navbarRef = xt(), this.spacerRef = xt(), this.scrollThreshold = 0, this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = new Ct(100, 300), document.addEventListener(
|
|
1141
1143
|
"scroll",
|
|
1142
1144
|
async () => {
|
|
1143
1145
|
this.updateScrollState();
|
|
@@ -1153,22 +1155,22 @@ let V = class extends g {
|
|
|
1153
1155
|
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;
|
|
1154
1156
|
}
|
|
1155
1157
|
async connectedCallback() {
|
|
1156
|
-
this.updateScrollState(), await
|
|
1158
|
+
this.updateScrollState(), await Bt(), super.connectedCallback();
|
|
1157
1159
|
}
|
|
1158
1160
|
// Adjust the spacer height on every render
|
|
1159
1161
|
async updated(s) {
|
|
1160
|
-
await
|
|
1162
|
+
await Gt(), super.updated(s);
|
|
1161
1163
|
const t = this.navbarRef.value, e = this.spacerRef.value;
|
|
1162
1164
|
console.log("Updating spacer height", t == null ? void 0 : t.offsetHeight, e), t && e && (e.style.height = `${t.offsetHeight}px`);
|
|
1163
1165
|
}
|
|
1164
1166
|
firstUpdated(s) {
|
|
1165
|
-
|
|
1167
|
+
rt.observeEmptySlots(this);
|
|
1166
1168
|
}
|
|
1167
1169
|
render() {
|
|
1168
1170
|
return R`
|
|
1169
1171
|
<div id="wrapper" part="wrapper">
|
|
1170
|
-
<div id="spacer" part="spacer" ${
|
|
1171
|
-
<div id="navbar" part="navbar" ${
|
|
1172
|
+
<div id="spacer" part="spacer" ${Et(this.spacerRef)}></div>
|
|
1173
|
+
<div id="navbar" part="navbar" ${Et(this.navbarRef)}>
|
|
1172
1174
|
<div id="brand" part="brand">
|
|
1173
1175
|
<slot name="brand"></slot>
|
|
1174
1176
|
</div>
|
|
@@ -1180,20 +1182,20 @@ let V = class extends g {
|
|
|
1180
1182
|
`;
|
|
1181
1183
|
}
|
|
1182
1184
|
};
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
],
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
],
|
|
1190
|
-
const
|
|
1191
|
-
var
|
|
1192
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
1185
|
+
Y.styles = [C(xe)];
|
|
1186
|
+
jt([
|
|
1187
|
+
f({ type: Number, attribute: "scroll-threshold", reflect: !0 })
|
|
1188
|
+
], Y.prototype, "scrollThreshold", 2);
|
|
1189
|
+
Y = jt([
|
|
1190
|
+
z("nte-navbar")
|
|
1191
|
+
], Y);
|
|
1192
|
+
const 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{--container-width: var(--nt-container-width, 100%);--background: transparent;--text-color: var(--nt-text);--height: auto;--brand-height: 80px;display:block;height:100%;width: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}";
|
|
1193
|
+
var Te = Object.getOwnPropertyDescriptor, Pe = (s, t, e, i) => {
|
|
1194
|
+
for (var n = i > 1 ? void 0 : i ? Te(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1193
1195
|
(o = s[r]) && (n = o(n) || n);
|
|
1194
1196
|
return n;
|
|
1195
1197
|
};
|
|
1196
|
-
let
|
|
1198
|
+
let nt = class extends _ {
|
|
1197
1199
|
static get is() {
|
|
1198
1200
|
return "nte-navbar-line";
|
|
1199
1201
|
}
|
|
@@ -1207,7 +1209,7 @@ let st = class extends g {
|
|
|
1207
1209
|
);
|
|
1208
1210
|
}
|
|
1209
1211
|
firstUpdated(s) {
|
|
1210
|
-
|
|
1212
|
+
rt.observeEmptySlots(this);
|
|
1211
1213
|
}
|
|
1212
1214
|
render() {
|
|
1213
1215
|
return R`
|
|
@@ -1224,12 +1226,44 @@ let st = class extends g {
|
|
|
1224
1226
|
`;
|
|
1225
1227
|
}
|
|
1226
1228
|
};
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
],
|
|
1229
|
+
nt.styles = [C(Ce)];
|
|
1230
|
+
nt = Pe([
|
|
1231
|
+
z("nte-navbar-line")
|
|
1232
|
+
], nt);
|
|
1233
|
+
const Oe = ":host{--size: 40px;--color: #666;--color-hover: #000;height:var(--size);width:var(--size)}.hamburger{display:block;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0 none;background:none;transition:transform .4s}.hamburger:hover{--color: var(--color-hover)}:host([open]) .hamburger .bar:nth-of-type(1){--translate: calc(var(--size) / 4);transform:translateY(var(--translate)) rotate(45deg)}:host([open]) .hamburger .bar:nth-of-type(2){opacity:0}:host([open]) .hamburger .bar:nth-of-type(3){--translate: calc(var(--size) / -4);transform:translateY(var(--translate)) rotate(-45deg)}.bar{height:3px;width:var(--size);display:block;margin:calc(var(--size) / 5.2) auto;position:relative;background-color:var(--color);transition:.4s}";
|
|
1234
|
+
var ke = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, ht = (s, t, e, i) => {
|
|
1235
|
+
for (var n = i > 1 ? void 0 : i ? Me(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1236
|
+
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
1237
|
+
return i && n && ke(t, e, n), n;
|
|
1238
|
+
};
|
|
1239
|
+
const Ue = `
|
|
1240
|
+
<div id="wrapper">
|
|
1241
|
+
<button id="button" class="hamburger">
|
|
1242
|
+
<div class="bar"></div>
|
|
1243
|
+
<div class="bar"></div>
|
|
1244
|
+
<div class="bar"></div>
|
|
1245
|
+
</button>
|
|
1246
|
+
</div>
|
|
1247
|
+
`;
|
|
1248
|
+
let F = class extends it {
|
|
1249
|
+
constructor() {
|
|
1250
|
+
super(Ue), this.open = !1, this.text = "Menu";
|
|
1251
|
+
}
|
|
1252
|
+
get css() {
|
|
1253
|
+
return C(Oe);
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
ht([
|
|
1257
|
+
f({ type: Boolean, attribute: "open", reflect: !0 })
|
|
1258
|
+
], F.prototype, "open", 2);
|
|
1259
|
+
ht([
|
|
1260
|
+
f({ type: String, reflect: !0 })
|
|
1261
|
+
], F.prototype, "text", 2);
|
|
1262
|
+
F = ht([
|
|
1263
|
+
z("nte-burger")
|
|
1264
|
+
], F);
|
|
1231
1265
|
console.log("Loading nte-nav...");
|
|
1232
1266
|
export {
|
|
1233
1267
|
$ as NteNav,
|
|
1234
|
-
|
|
1268
|
+
Y as NteNavbar
|
|
1235
1269
|
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextrap/nte-nav",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@nextrap/nt-framework": "^0.0.1",
|
|
7
7
|
"@nextrap/nte-burger": "^0.0.1",
|
|
8
|
-
"@nextrap/nte-offcanvas": "^0.0.
|
|
8
|
+
"@nextrap/nte-offcanvas": "^0.0.10"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@nextrap/style-base": "^
|
|
11
|
+
"@nextrap/style-base": "^1.0.1",
|
|
12
12
|
"@nextrap/style-reset": "^0.1.1"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|