| ... | ... |
@@ -1,7 +1,14 @@ |
| 1 | 1 |
import { LitElement, html, css } from 'lit';
|
| 2 | 2 |
|
| 3 | 3 |
export class WinzerCard extends LitElement {
|
| 4 |
- static properties = { category: { type: String }, date: { type: String }, title: { type: String }, text: { type: String }, hasAttachment: { type: Boolean }, featured: { type: Boolean } };
|
|
| 4 |
+ static properties = {
|
|
| 5 |
+ category: { type: String },
|
|
| 6 |
+ date: { type: String },
|
|
| 7 |
+ title: { type: String },
|
|
| 8 |
+ text: { type: String },
|
|
| 9 |
+ hasAttachment: { type: Boolean },
|
|
| 10 |
+ featured: { type: Boolean }
|
|
| 11 |
+ }; |
|
| 5 | 12 |
static styles = css` |
| 6 | 13 |
:host { display: block; margin-bottom: 35px; }
|
| 7 | 14 |
.card { background-color: var(--bg-card); border-radius: var(--radius-card); padding: 20px 20px 40px 20px; position: relative; color: var(--text-main); display: block; }
|
| ... | ... |
@@ -13,9 +20,30 @@ export class WinzerCard extends LitElement {
|
| 13 | 20 |
.action-btn { position: absolute; bottom: -20px; right: 20px; background-color: var(--primary-color); color: var(--bg-white); width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); cursor: pointer; transition: transform 0.1s; z-index: 10; }
|
| 14 | 21 |
.action-btn:active { transform: scale(0.95); }
|
| 15 | 22 |
svg { width: 24px; height: 24px; fill: currentColor; }
|
| 23 |
+ |
|
| 24 |
+ /* Slot for tags */ |
|
| 25 |
+ .tags-container {
|
|
| 26 |
+ display: flex; |
|
| 27 |
+ gap: 8px; |
|
| 28 |
+ margin-top: 12px; |
|
| 29 |
+ flex-wrap: wrap; |
|
| 30 |
+ } |
|
| 16 | 31 |
`; |
| 17 | 32 |
render() {
|
| 18 |
- return html`<div class="card ${this.featured ? 'featured' : ''}"><div class="header"><span>${this.category}</span><span>${this.date}</span></div><h3>${this.title}</h3><p>${this.text}</p>${this.hasAttachment ? html`<div class="attachment-icon"><svg viewBox="0 0 24 24"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></svg></div>` : ''}<div class="action-btn"><svg viewBox="0 0 24 24"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg></div></div>`;
|
|
| 33 |
+ return html` |
|
| 34 |
+ <div class="card ${this.featured ? 'featured' : ''}">
|
|
| 35 |
+ <div class="header"><span>${this.category}</span><span>${this.date}</span></div>
|
|
| 36 |
+ <h3>${this.title}</h3>
|
|
| 37 |
+ <p>${this.text}</p>
|
|
| 38 |
+ |
|
| 39 |
+ <div class="tags-container"> |
|
| 40 |
+ <slot name="tags"></slot> |
|
| 41 |
+ </div> |
|
| 42 |
+ |
|
| 43 |
+ ${this.hasAttachment ? html`<div class="attachment-icon"><svg viewBox="0 0 24 24"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></svg></div>` : ''}
|
|
| 44 |
+ <div class="action-btn"><svg viewBox="0 0 24 24"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg></div> |
|
| 45 |
+ </div> |
|
| 46 |
+ `; |
|
| 19 | 47 |
} |
| 20 | 48 |
} |
| 21 | 49 |
customElements.define('winzer-card', WinzerCard);
|
| ... | ... |
@@ -19,6 +19,7 @@ export class WinzerFileCard extends LitElement {
|
| 19 | 19 |
border: 1px solid var(--border-color); |
| 20 | 20 |
box-shadow: var(--shadow-sm); |
| 21 | 21 |
position: relative; |
| 22 |
+ flex-wrap: wrap; |
|
| 22 | 23 |
} |
| 23 | 24 |
|
| 24 | 25 |
/* UPDATE: Styling für neue Dateien (Weißer BG + Farbiger Rand) */ |
| ... | ... |
@@ -58,9 +59,19 @@ export class WinzerFileCard extends LitElement {
|
| 58 | 59 |
font-weight: 700; |
| 59 | 60 |
} |
| 60 | 61 |
|
| 62 |
+ .file-meta-row {
|
|
| 63 |
+ display: flex; |
|
| 64 |
+ align-items: center; |
|
| 65 |
+ gap: 12px; |
|
| 66 |
+ flex-wrap: wrap; |
|
| 67 |
+ } |
|
| 68 |
+ |
|
| 61 | 69 |
.file-meta {
|
| 62 | 70 |
font-size: 0.75rem; |
| 63 | 71 |
color: var(--text-muted); |
| 72 |
+ line-height: 1; /* Ensure consistent height */ |
|
| 73 |
+ display: flex; |
|
| 74 |
+ align-items: center; |
|
| 64 | 75 |
} |
| 65 | 76 |
.download-btn {
|
| 66 | 77 |
width: 36px; |
| ... | ... |
@@ -116,6 +127,14 @@ export class WinzerFileCard extends LitElement {
|
| 116 | 127 |
.type-pdf { color: var(--alert-color); }
|
| 117 | 128 |
.type-doc { color: #2b5797; } /* Word blueish */
|
| 118 | 129 |
.type-default { color: var(--text-muted); }
|
| 130 |
+ |
|
| 131 |
+ /* Slot for tags */ |
|
| 132 |
+ .tags-container {
|
|
| 133 |
+ display: flex; |
|
| 134 |
+ align-items: center; /* Ensure tags are vertically centered */ |
|
| 135 |
+ gap: 8px; |
|
| 136 |
+ flex-wrap: wrap; |
|
| 137 |
+ } |
|
| 119 | 138 |
`; |
| 120 | 139 |
|
| 121 | 140 |
_getIcon(type) {
|
| ... | ... |
@@ -139,7 +158,12 @@ export class WinzerFileCard extends LitElement {
|
| 139 | 158 |
|
| 140 | 159 |
<div class="file-info"> |
| 141 | 160 |
<div class="file-name">${this.file.name}</div>
|
| 142 |
- <div class="file-meta">${this.file.date} ${this.file.size}</div>
|
|
| 161 |
+ <div class="file-meta-row"> |
|
| 162 |
+ <div class="file-meta">${this.file.date} ${this.file.size}</div>
|
|
| 163 |
+ <div class="tags-container"> |
|
| 164 |
+ <slot name="tags"></slot> |
|
| 165 |
+ </div> |
|
| 166 |
+ </div> |
|
| 143 | 167 |
</div> |
| 144 | 168 |
|
| 145 | 169 |
<div class="download-btn"> |
| 146 | 170 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,139 @@ |
| 1 |
+import { LitElement, html, css } from 'lit';
|
|
| 2 |
+ |
|
| 3 |
+export class WinzerTag extends LitElement {
|
|
| 4 |
+ static properties = {
|
|
| 5 |
+ label: { type: String },
|
|
| 6 |
+ color: { type: String }, // 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'
|
|
| 7 |
+ variant: { type: String }, // 'solid' (default), 'outline'
|
|
| 8 |
+ size: { type: String }, // 'xs', 'sm' (default), 'md'
|
|
| 9 |
+ removable: { type: Boolean },
|
|
| 10 |
+ clickable: { type: Boolean }
|
|
| 11 |
+ }; |
|
| 12 |
+ |
|
| 13 |
+ static styles = css` |
|
| 14 |
+ :host {
|
|
| 15 |
+ display: inline-flex; |
|
| 16 |
+ vertical-align: middle; |
|
| 17 |
+ line-height: 0; |
|
| 18 |
+ } |
|
| 19 |
+ .tag {
|
|
| 20 |
+ display: flex; |
|
| 21 |
+ align-items: center; |
|
| 22 |
+ border-radius: 4px; |
|
| 23 |
+ font-weight: 600; |
|
| 24 |
+ line-height: normal; |
|
| 25 |
+ white-space: nowrap; |
|
| 26 |
+ border: 1px solid transparent; |
|
| 27 |
+ gap: 4px; |
|
| 28 |
+ transition: all 0.2s ease; |
|
| 29 |
+ box-sizing: border-box; |
|
| 30 |
+ } |
|
| 31 |
+ |
|
| 32 |
+ /* Sizes */ |
|
| 33 |
+ .tag.xs { padding: 2px 6px; font-size: 0.65rem; border-radius: 3px; }
|
|
| 34 |
+ .tag.sm { padding: 4px 8px; font-size: 0.75rem; }
|
|
| 35 |
+ .tag.md { padding: 6px 10px; font-size: 0.85rem; }
|
|
| 36 |
+ |
|
| 37 |
+ /* Clickable */ |
|
| 38 |
+ .tag.clickable { cursor: pointer; }
|
|
| 39 |
+ .tag.clickable:hover { opacity: 0.9; transform: translateY(-1px); }
|
|
| 40 |
+ .tag.clickable:active { transform: translateY(0); }
|
|
| 41 |
+ |
|
| 42 |
+ /* Solid Variants */ |
|
| 43 |
+ .tag.solid { background-color: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }
|
|
| 44 |
+ .tag.solid.primary { background-color: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); }
|
|
| 45 |
+ .tag.solid.secondary { background-color: var(--secondary-light); color: var(--secondary-color); border-color: var(--secondary-color); }
|
|
| 46 |
+ .tag.solid.success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
|
|
| 47 |
+ .tag.solid.danger { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
|
|
| 48 |
+ .tag.solid.warning { background-color: #fff3cd; color: #856404; border-color: #ffeeba; }
|
|
| 49 |
+ .tag.solid.info { background-color: #d1ecf1; color: #0c5460; border-color: #bee5eb; }
|
|
| 50 |
+ .tag.solid.light { background-color: #fefefe; color: #818182; border-color: #fdfdfe; }
|
|
| 51 |
+ .tag.solid.dark { background-color: #d6d8d9; color: #1b1e21; border-color: #c6c8ca; }
|
|
| 52 |
+ |
|
| 53 |
+ /* Outline Variants */ |
|
| 54 |
+ .tag.outline { background-color: transparent; }
|
|
| 55 |
+ .tag.outline.primary { color: var(--primary-color); border-color: var(--primary-color); }
|
|
| 56 |
+ .tag.outline.secondary { color: var(--secondary-color); border-color: var(--secondary-color); }
|
|
| 57 |
+ .tag.outline.success { color: #28a745; border-color: #28a745; }
|
|
| 58 |
+ .tag.outline.danger { color: #dc3545; border-color: #dc3545; }
|
|
| 59 |
+ .tag.outline.warning { color: #ffc107; border-color: #ffc107; }
|
|
| 60 |
+ .tag.outline.info { color: #17a2b8; border-color: #17a2b8; }
|
|
| 61 |
+ .tag.outline.light { color: #f8f9fa; border-color: #f8f9fa; }
|
|
| 62 |
+ .tag.outline.dark { color: #343a40; border-color: #343a40; }
|
|
| 63 |
+ |
|
| 64 |
+ /* Icon Slot Styling */ |
|
| 65 |
+ ::slotted(svg) {
|
|
| 66 |
+ width: 12px; |
|
| 67 |
+ height: 12px; |
|
| 68 |
+ fill: currentColor; |
|
| 69 |
+ display: block; |
|
| 70 |
+ } |
|
| 71 |
+ .tag.xs ::slotted(svg) {
|
|
| 72 |
+ width: 10px; |
|
| 73 |
+ height: 10px; |
|
| 74 |
+ } |
|
| 75 |
+ .tag.md ::slotted(svg) {
|
|
| 76 |
+ width: 14px; |
|
| 77 |
+ height: 14px; |
|
| 78 |
+ } |
|
| 79 |
+ |
|
| 80 |
+ /* Remove Button */ |
|
| 81 |
+ .remove-btn {
|
|
| 82 |
+ display: inline-flex; |
|
| 83 |
+ align-items: center; |
|
| 84 |
+ justify-content: center; |
|
| 85 |
+ margin-left: 2px; |
|
| 86 |
+ cursor: pointer; |
|
| 87 |
+ opacity: 0.6; |
|
| 88 |
+ transition: opacity 0.2s; |
|
| 89 |
+ border-radius: 50%; |
|
| 90 |
+ width: 14px; |
|
| 91 |
+ height: 14px; |
|
| 92 |
+ } |
|
| 93 |
+ .tag.xs .remove-btn {
|
|
| 94 |
+ width: 10px; |
|
| 95 |
+ height: 10px; |
|
| 96 |
+ margin-left: 1px; |
|
| 97 |
+ } |
|
| 98 |
+ .remove-btn:hover { opacity: 1; background-color: rgba(0,0,0,0.1); }
|
|
| 99 |
+ .remove-btn svg { width: 10px; height: 10px; stroke-width: 3; }
|
|
| 100 |
+ .tag.xs .remove-btn svg { width: 8px; height: 8px; }
|
|
| 101 |
+ `; |
|
| 102 |
+ |
|
| 103 |
+ constructor() {
|
|
| 104 |
+ super(); |
|
| 105 |
+ this.variant = 'solid'; |
|
| 106 |
+ this.size = 'sm'; |
|
| 107 |
+ this.removable = false; |
|
| 108 |
+ this.clickable = false; |
|
| 109 |
+ } |
|
| 110 |
+ |
|
| 111 |
+ _handleRemove(e) {
|
|
| 112 |
+ e.stopPropagation(); |
|
| 113 |
+ this.dispatchEvent(new CustomEvent('remove', { bubbles: true, composed: true }));
|
|
| 114 |
+ } |
|
| 115 |
+ |
|
| 116 |
+ render() {
|
|
| 117 |
+ const classes = [ |
|
| 118 |
+ 'tag', |
|
| 119 |
+ this.variant || 'solid', |
|
| 120 |
+ this.size || 'sm', |
|
| 121 |
+ this.color || '', |
|
| 122 |
+ this.clickable ? 'clickable' : '' |
|
| 123 |
+ ].filter(Boolean).join(' ');
|
|
| 124 |
+ |
|
| 125 |
+ return html` |
|
| 126 |
+ <div class="${classes}">
|
|
| 127 |
+ <slot name="icon"></slot> |
|
| 128 |
+ <span>${this.label}</span>
|
|
| 129 |
+ <slot></slot> |
|
| 130 |
+ ${this.removable ? html`
|
|
| 131 |
+ <span class="remove-btn" @click="${this._handleRemove}">
|
|
| 132 |
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg> |
|
| 133 |
+ </span> |
|
| 134 |
+ ` : ''} |
|
| 135 |
+ </div> |
|
| 136 |
+ `; |
|
| 137 |
+ } |
|
| 138 |
+} |
|
| 139 |
+customElements.define('winzer-tag', WinzerTag);
|
| ... | ... |
@@ -1,23 +1,23 @@ |
| 1 |
-var Ee = Object.defineProperty; |
|
| 2 |
-var Se = (o, e, t) => e in o ? Ee(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
| 3 |
-var p = (o, e, t) => Se(o, typeof e != "symbol" ? e + "" : e, t); |
|
| 1 |
+var Se = Object.defineProperty; |
|
| 2 |
+var Ce = (o, e, t) => e in o ? Se(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
| 3 |
+var d = (o, e, t) => Ce(o, typeof e != "symbol" ? e + "" : e, t); |
|
| 4 | 4 |
/** |
| 5 | 5 |
* @license |
| 6 | 6 |
* Copyright 2019 Google LLC |
| 7 | 7 |
* SPDX-License-Identifier: BSD-3-Clause |
| 8 | 8 |
*/ |
| 9 |
-const N = globalThis, te = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ie = Symbol(), oe = /* @__PURE__ */ new WeakMap(); |
|
| 10 |
-let fe = class {
|
|
| 11 |
- constructor(e, t, i) {
|
|
| 12 |
- if (this._$cssResult$ = !0, i !== ie) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
| 9 |
+const B = globalThis, re = B.ShadowRoot && (B.ShadyCSS === void 0 || B.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ie = Symbol(), se = /* @__PURE__ */ new WeakMap(); |
|
| 10 |
+let ve = class {
|
|
| 11 |
+ constructor(e, t, r) {
|
|
| 12 |
+ if (this._$cssResult$ = !0, r !== ie) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
| 13 | 13 |
this.cssText = e, this.t = t; |
| 14 | 14 |
} |
| 15 | 15 |
get styleSheet() {
|
| 16 | 16 |
let e = this.o; |
| 17 | 17 |
const t = this.t; |
| 18 |
- if (te && e === void 0) {
|
|
| 19 |
- const i = t !== void 0 && t.length === 1; |
|
| 20 |
- i && (e = oe.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && oe.set(t, e)); |
|
| 18 |
+ if (re && e === void 0) {
|
|
| 19 |
+ const r = t !== void 0 && t.length === 1; |
|
| 20 |
+ r && (e = se.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && se.set(t, e)); |
|
| 21 | 21 |
} |
| 22 | 22 |
return e; |
| 23 | 23 |
} |
| ... | ... |
@@ -25,33 +25,33 @@ let fe = class {
|
| 25 | 25 |
return this.cssText; |
| 26 | 26 |
} |
| 27 | 27 |
}; |
| 28 |
-const Ce = (o) => new fe(typeof o == "string" ? o : o + "", void 0, ie), f = (o, ...e) => {
|
|
| 29 |
- const t = o.length === 1 ? o[0] : e.reduce((i, r, n) => i + ((s) => {
|
|
| 28 |
+const ze = (o) => new ve(typeof o == "string" ? o : o + "", void 0, ie), f = (o, ...e) => {
|
|
| 29 |
+ const t = o.length === 1 ? o[0] : e.reduce((r, i, n) => r + ((s) => {
|
|
| 30 | 30 |
if (s._$cssResult$ === !0) return s.cssText; |
| 31 | 31 |
if (typeof s == "number") return s; |
| 32 | 32 |
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
| 33 |
- })(r) + o[n + 1], o[0]); |
|
| 34 |
- return new fe(t, o, ie); |
|
| 33 |
+ })(i) + o[n + 1], o[0]); |
|
| 34 |
+ return new ve(t, o, ie); |
|
| 35 | 35 |
}, Me = (o, e) => {
|
| 36 |
- if (te) o.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet); |
|
| 36 |
+ if (re) o.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet); |
|
| 37 | 37 |
else for (const t of e) {
|
| 38 |
- const i = document.createElement("style"), r = N.litNonce;
|
|
| 39 |
- r !== void 0 && i.setAttribute("nonce", r), i.textContent = t.cssText, o.appendChild(i);
|
|
| 38 |
+ const r = document.createElement("style"), i = B.litNonce;
|
|
| 39 |
+ i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, o.appendChild(r);
|
|
| 40 | 40 |
} |
| 41 |
-}, se = te ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((e) => {
|
|
| 41 |
+}, ne = re ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((e) => {
|
|
| 42 | 42 |
let t = ""; |
| 43 |
- for (const i of e.cssRules) t += i.cssText; |
|
| 44 |
- return Ce(t); |
|
| 43 |
+ for (const r of e.cssRules) t += r.cssText; |
|
| 44 |
+ return ze(t); |
|
| 45 | 45 |
})(o) : o; |
| 46 | 46 |
/** |
| 47 | 47 |
* @license |
| 48 | 48 |
* Copyright 2017 Google LLC |
| 49 | 49 |
* SPDX-License-Identifier: BSD-3-Clause |
| 50 | 50 |
*/ |
| 51 |
-const { is: Te, defineProperty: ze, getOwnPropertyDescriptor: Pe, getOwnPropertyNames: Ue, getOwnPropertySymbols: Oe, getPrototypeOf: He } = Object, y = globalThis, ne = y.trustedTypes, Re = ne ? ne.emptyScript : "", j = y.reactiveElementPolyfillSupport, T = (o, e) => o, F = { toAttribute(o, e) {
|
|
| 51 |
+const { is: Te, defineProperty: Pe, getOwnPropertyDescriptor: Ue, getOwnPropertyNames: Oe, getOwnPropertySymbols: Re, getPrototypeOf: He } = Object, y = globalThis, ae = y.trustedTypes, Be = ae ? ae.emptyScript : "", D = y.reactiveElementPolyfillSupport, M = (o, e) => o, F = { toAttribute(o, e) {
|
|
| 52 | 52 |
switch (e) {
|
| 53 | 53 |
case Boolean: |
| 54 |
- o = o ? Re : null; |
|
| 54 |
+ o = o ? Be : null; |
|
| 55 | 55 |
break; |
| 56 | 56 |
case Object: |
| 57 | 57 |
case Array: |
| ... | ... |
@@ -76,7 +76,7 @@ const { is: Te, defineProperty: ze, getOwnPropertyDescriptor: Pe, getOwnProperty
|
| 76 | 76 |
} |
| 77 | 77 |
} |
| 78 | 78 |
return t; |
| 79 |
-} }, ve = (o, e) => !Te(o, e), ae = { attribute: !0, type: String, converter: F, reflect: !1, useDefault: !1, hasChanged: ve };
|
|
| 79 |
+} }, be = (o, e) => !Te(o, e), le = { attribute: !0, type: String, converter: F, reflect: !1, useDefault: !1, hasChanged: be };
|
|
| 80 | 80 |
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), y.litPropertyMetadata ?? (y.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
| 81 | 81 |
let E = class extends HTMLElement {
|
| 82 | 82 |
static addInitializer(e) {
|
| ... | ... |
@@ -85,60 +85,60 @@ let E = class extends HTMLElement {
|
| 85 | 85 |
static get observedAttributes() {
|
| 86 | 86 |
return this.finalize(), this._$Eh && [...this._$Eh.keys()]; |
| 87 | 87 |
} |
| 88 |
- static createProperty(e, t = ae) {
|
|
| 88 |
+ static createProperty(e, t = le) {
|
|
| 89 | 89 |
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
| 90 |
- const i = Symbol(), r = this.getPropertyDescriptor(e, i, t); |
|
| 91 |
- r !== void 0 && ze(this.prototype, e, r); |
|
| 90 |
+ const r = Symbol(), i = this.getPropertyDescriptor(e, r, t); |
|
| 91 |
+ i !== void 0 && Pe(this.prototype, e, i); |
|
| 92 | 92 |
} |
| 93 | 93 |
} |
| 94 |
- static getPropertyDescriptor(e, t, i) {
|
|
| 95 |
- const { get: r, set: n } = Pe(this.prototype, e) ?? { get() {
|
|
| 94 |
+ static getPropertyDescriptor(e, t, r) {
|
|
| 95 |
+ const { get: i, set: n } = Ue(this.prototype, e) ?? { get() {
|
|
| 96 | 96 |
return this[t]; |
| 97 | 97 |
}, set(s) {
|
| 98 | 98 |
this[t] = s; |
| 99 | 99 |
} }; |
| 100 |
- return { get: r, set(s) {
|
|
| 101 |
- const l = r == null ? void 0 : r.call(this); |
|
| 102 |
- n == null || n.call(this, s), this.requestUpdate(e, l, i); |
|
| 100 |
+ return { get: i, set(s) {
|
|
| 101 |
+ const l = i == null ? void 0 : i.call(this); |
|
| 102 |
+ n == null || n.call(this, s), this.requestUpdate(e, l, r); |
|
| 103 | 103 |
}, configurable: !0, enumerable: !0 }; |
| 104 | 104 |
} |
| 105 | 105 |
static getPropertyOptions(e) {
|
| 106 |
- return this.elementProperties.get(e) ?? ae; |
|
| 106 |
+ return this.elementProperties.get(e) ?? le; |
|
| 107 | 107 |
} |
| 108 | 108 |
static _$Ei() {
|
| 109 |
- if (this.hasOwnProperty(T("elementProperties"))) return;
|
|
| 109 |
+ if (this.hasOwnProperty(M("elementProperties"))) return;
|
|
| 110 | 110 |
const e = He(this); |
| 111 | 111 |
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties); |
| 112 | 112 |
} |
| 113 | 113 |
static finalize() {
|
| 114 |
- if (this.hasOwnProperty(T("finalized"))) return;
|
|
| 115 |
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
|
|
| 116 |
- const t = this.properties, i = [...Ue(t), ...Oe(t)]; |
|
| 117 |
- for (const r of i) this.createProperty(r, t[r]); |
|
| 114 |
+ if (this.hasOwnProperty(M("finalized"))) return;
|
|
| 115 |
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
|
| 116 |
+ const t = this.properties, r = [...Oe(t), ...Re(t)]; |
|
| 117 |
+ for (const i of r) this.createProperty(i, t[i]); |
|
| 118 | 118 |
} |
| 119 | 119 |
const e = this[Symbol.metadata]; |
| 120 | 120 |
if (e !== null) {
|
| 121 | 121 |
const t = litPropertyMetadata.get(e); |
| 122 |
- if (t !== void 0) for (const [i, r] of t) this.elementProperties.set(i, r); |
|
| 122 |
+ if (t !== void 0) for (const [r, i] of t) this.elementProperties.set(r, i); |
|
| 123 | 123 |
} |
| 124 | 124 |
this._$Eh = /* @__PURE__ */ new Map(); |
| 125 |
- for (const [t, i] of this.elementProperties) {
|
|
| 126 |
- const r = this._$Eu(t, i); |
|
| 127 |
- r !== void 0 && this._$Eh.set(r, t); |
|
| 125 |
+ for (const [t, r] of this.elementProperties) {
|
|
| 126 |
+ const i = this._$Eu(t, r); |
|
| 127 |
+ i !== void 0 && this._$Eh.set(i, t); |
|
| 128 | 128 |
} |
| 129 | 129 |
this.elementStyles = this.finalizeStyles(this.styles); |
| 130 | 130 |
} |
| 131 | 131 |
static finalizeStyles(e) {
|
| 132 | 132 |
const t = []; |
| 133 | 133 |
if (Array.isArray(e)) {
|
| 134 |
- const i = new Set(e.flat(1 / 0).reverse()); |
|
| 135 |
- for (const r of i) t.unshift(se(r)); |
|
| 136 |
- } else e !== void 0 && t.push(se(e)); |
|
| 134 |
+ const r = new Set(e.flat(1 / 0).reverse()); |
|
| 135 |
+ for (const i of r) t.unshift(ne(i)); |
|
| 136 |
+ } else e !== void 0 && t.push(ne(e)); |
|
| 137 | 137 |
return t; |
| 138 | 138 |
} |
| 139 | 139 |
static _$Eu(e, t) {
|
| 140 |
- const i = t.attribute; |
|
| 141 |
- return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0; |
|
| 140 |
+ const r = t.attribute; |
|
| 141 |
+ return r === !1 ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.toLowerCase() : void 0; |
|
| 142 | 142 |
} |
| 143 | 143 |
constructor() {
|
| 144 | 144 |
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev(); |
| ... | ... |
@@ -157,7 +157,7 @@ let E = class extends HTMLElement {
|
| 157 | 157 |
} |
| 158 | 158 |
_$E_() {
|
| 159 | 159 |
const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties; |
| 160 |
- for (const i of t.keys()) this.hasOwnProperty(i) && (e.set(i, this[i]), delete this[i]); |
|
| 160 |
+ for (const r of t.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]); |
|
| 161 | 161 |
e.size > 0 && (this._$Ep = e); |
| 162 | 162 |
} |
| 163 | 163 |
createRenderRoot() {
|
| ... | ... |
@@ -167,8 +167,8 @@ let E = class extends HTMLElement {
|
| 167 | 167 |
connectedCallback() {
|
| 168 | 168 |
var e; |
| 169 | 169 |
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
|
| 170 |
- var i; |
|
| 171 |
- return (i = t.hostConnected) == null ? void 0 : i.call(t); |
|
| 170 |
+ var r; |
|
| 171 |
+ return (r = t.hostConnected) == null ? void 0 : r.call(t); |
|
| 172 | 172 |
}); |
| 173 | 173 |
} |
| 174 | 174 |
enableUpdating(e) {
|
| ... | ... |
@@ -176,42 +176,42 @@ let E = class extends HTMLElement {
|
| 176 | 176 |
disconnectedCallback() {
|
| 177 | 177 |
var e; |
| 178 | 178 |
(e = this._$EO) == null || e.forEach((t) => {
|
| 179 |
- var i; |
|
| 180 |
- return (i = t.hostDisconnected) == null ? void 0 : i.call(t); |
|
| 179 |
+ var r; |
|
| 180 |
+ return (r = t.hostDisconnected) == null ? void 0 : r.call(t); |
|
| 181 | 181 |
}); |
| 182 | 182 |
} |
| 183 |
- attributeChangedCallback(e, t, i) {
|
|
| 184 |
- this._$AK(e, i); |
|
| 183 |
+ attributeChangedCallback(e, t, r) {
|
|
| 184 |
+ this._$AK(e, r); |
|
| 185 | 185 |
} |
| 186 | 186 |
_$ET(e, t) {
|
| 187 | 187 |
var n; |
| 188 |
- const i = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, i); |
|
| 189 |
- if (r !== void 0 && i.reflect === !0) {
|
|
| 190 |
- const s = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : F).toAttribute(t, i.type); |
|
| 191 |
- this._$Em = e, s == null ? this.removeAttribute(r) : this.setAttribute(r, s), this._$Em = null; |
|
| 188 |
+ const r = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, r); |
|
| 189 |
+ if (i !== void 0 && r.reflect === !0) {
|
|
| 190 |
+ const s = (((n = r.converter) == null ? void 0 : n.toAttribute) !== void 0 ? r.converter : F).toAttribute(t, r.type); |
|
| 191 |
+ this._$Em = e, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$Em = null; |
|
| 192 | 192 |
} |
| 193 | 193 |
} |
| 194 | 194 |
_$AK(e, t) {
|
| 195 | 195 |
var n, s; |
| 196 |
- const i = this.constructor, r = i._$Eh.get(e); |
|
| 197 |
- if (r !== void 0 && this._$Em !== r) {
|
|
| 198 |
- const l = i.getPropertyOptions(r), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((n = l.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? l.converter : F;
|
|
| 199 |
- this._$Em = r; |
|
| 200 |
- const d = a.fromAttribute(t, l.type); |
|
| 201 |
- this[r] = d ?? ((s = this._$Ej) == null ? void 0 : s.get(r)) ?? d, this._$Em = null; |
|
| 196 |
+ const r = this.constructor, i = r._$Eh.get(e); |
|
| 197 |
+ if (i !== void 0 && this._$Em !== i) {
|
|
| 198 |
+ const l = r.getPropertyOptions(i), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((n = l.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? l.converter : F;
|
|
| 199 |
+ this._$Em = i; |
|
| 200 |
+ const p = a.fromAttribute(t, l.type); |
|
| 201 |
+ this[i] = p ?? ((s = this._$Ej) == null ? void 0 : s.get(i)) ?? p, this._$Em = null; |
|
| 202 | 202 |
} |
| 203 | 203 |
} |
| 204 |
- requestUpdate(e, t, i, r = !1, n) {
|
|
| 204 |
+ requestUpdate(e, t, r, i = !1, n) {
|
|
| 205 | 205 |
var s; |
| 206 | 206 |
if (e !== void 0) {
|
| 207 | 207 |
const l = this.constructor; |
| 208 |
- if (r === !1 && (n = this[e]), i ?? (i = l.getPropertyOptions(e)), !((i.hasChanged ?? ve)(n, t) || i.useDefault && i.reflect && n === ((s = this._$Ej) == null ? void 0 : s.get(e)) && !this.hasAttribute(l._$Eu(e, i)))) return; |
|
| 209 |
- this.C(e, t, i); |
|
| 208 |
+ if (i === !1 && (n = this[e]), r ?? (r = l.getPropertyOptions(e)), !((r.hasChanged ?? be)(n, t) || r.useDefault && r.reflect && n === ((s = this._$Ej) == null ? void 0 : s.get(e)) && !this.hasAttribute(l._$Eu(e, r)))) return; |
|
| 209 |
+ this.C(e, t, r); |
|
| 210 | 210 |
} |
| 211 | 211 |
this.isUpdatePending === !1 && (this._$ES = this._$EP()); |
| 212 | 212 |
} |
| 213 |
- C(e, t, { useDefault: i, reflect: r, wrapped: n }, s) {
|
|
| 214 |
- i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, s ?? t ?? this[e]), n !== !0 || s !== void 0) || (this._$AL.has(e) || (this.hasUpdated || i || (t = void 0), this._$AL.set(e, t)), r === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e)); |
|
| 213 |
+ C(e, t, { useDefault: r, reflect: i, wrapped: n }, s) {
|
|
| 214 |
+ r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, s ?? t ?? this[e]), n !== !0 || s !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (t = void 0), this._$AL.set(e, t)), i === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e)); |
|
| 215 | 215 |
} |
| 216 | 216 |
async _$EP() {
|
| 217 | 217 |
this.isUpdatePending = !0; |
| ... | ... |
@@ -227,15 +227,15 @@ let E = class extends HTMLElement {
|
| 227 | 227 |
return this.performUpdate(); |
| 228 | 228 |
} |
| 229 | 229 |
performUpdate() {
|
| 230 |
- var i; |
|
| 230 |
+ var r; |
|
| 231 | 231 |
if (!this.isUpdatePending) return; |
| 232 | 232 |
if (!this.hasUpdated) {
|
| 233 | 233 |
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
| 234 | 234 |
for (const [n, s] of this._$Ep) this[n] = s; |
| 235 | 235 |
this._$Ep = void 0; |
| 236 | 236 |
} |
| 237 |
- const r = this.constructor.elementProperties; |
|
| 238 |
- if (r.size > 0) for (const [n, s] of r) {
|
|
| 237 |
+ const i = this.constructor.elementProperties; |
|
| 238 |
+ if (i.size > 0) for (const [n, s] of i) {
|
|
| 239 | 239 |
const { wrapped: l } = s, a = this[n];
|
| 240 | 240 |
l !== !0 || this._$AL.has(n) || a === void 0 || this.C(n, void 0, s, a); |
| 241 | 241 |
} |
| ... | ... |
@@ -243,12 +243,12 @@ let E = class extends HTMLElement {
|
| 243 | 243 |
let e = !1; |
| 244 | 244 |
const t = this._$AL; |
| 245 | 245 |
try {
|
| 246 |
- e = this.shouldUpdate(t), e ? (this.willUpdate(t), (i = this._$EO) == null || i.forEach((r) => {
|
|
| 246 |
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), (r = this._$EO) == null || r.forEach((i) => {
|
|
| 247 | 247 |
var n; |
| 248 |
- return (n = r.hostUpdate) == null ? void 0 : n.call(r); |
|
| 248 |
+ return (n = i.hostUpdate) == null ? void 0 : n.call(i); |
|
| 249 | 249 |
}), this.update(t)) : this._$EM(); |
| 250 |
- } catch (r) {
|
|
| 251 |
- throw e = !1, this._$EM(), r; |
|
| 250 |
+ } catch (i) {
|
|
| 251 |
+ throw e = !1, this._$EM(), i; |
|
| 252 | 252 |
} |
| 253 | 253 |
e && this._$AE(t); |
| 254 | 254 |
} |
| ... | ... |
@@ -256,9 +256,9 @@ let E = class extends HTMLElement {
|
| 256 | 256 |
} |
| 257 | 257 |
_$AE(e) {
|
| 258 | 258 |
var t; |
| 259 |
- (t = this._$EO) == null || t.forEach((i) => {
|
|
| 260 |
- var r; |
|
| 261 |
- return (r = i.hostUpdated) == null ? void 0 : r.call(i); |
|
| 259 |
+ (t = this._$EO) == null || t.forEach((r) => {
|
|
| 260 |
+ var i; |
|
| 261 |
+ return (i = r.hostUpdated) == null ? void 0 : i.call(r); |
|
| 262 | 262 |
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e); |
| 263 | 263 |
} |
| 264 | 264 |
_$EM() {
|
| ... | ... |
@@ -281,76 +281,76 @@ let E = class extends HTMLElement {
|
| 281 | 281 |
firstUpdated(e) {
|
| 282 | 282 |
} |
| 283 | 283 |
}; |
| 284 |
-E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[T("elementProperties")] = /* @__PURE__ */ new Map(), E[T("finalized")] = /* @__PURE__ */ new Map(), j == null || j({ ReactiveElement: E }), (y.reactiveElementVersions ?? (y.reactiveElementVersions = [])).push("2.1.2");
|
|
| 284 |
+E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[M("elementProperties")] = /* @__PURE__ */ new Map(), E[M("finalized")] = /* @__PURE__ */ new Map(), D == null || D({ ReactiveElement: E }), (y.reactiveElementVersions ?? (y.reactiveElementVersions = [])).push("2.1.2");
|
|
| 285 | 285 |
/** |
| 286 | 286 |
* @license |
| 287 | 287 |
* Copyright 2017 Google LLC |
| 288 | 288 |
* SPDX-License-Identifier: BSD-3-Clause |
| 289 | 289 |
*/ |
| 290 |
-const z = globalThis, le = (o) => o, B = z.trustedTypes, ce = B ? B.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, be = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, xe = "?" + x, Ne = `<${xe}>`, k = document, P = () => k.createComment(""), U = (o) => o === null || typeof o != "object" && typeof o != "function", re = Array.isArray, Be = (o) => re(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", L = `[
|
|
| 291 |
-\f\r]`, M = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, de = /-->/g, he = />/g, $ = RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^
|
|
| 292 |
-\f\r"'\`<>=]|("|')|))|$)`, "g"), pe = /'/g, ue = /"/g, ye = /^(?:script|style|textarea|title)$/i, $e = (o) => (e, ...t) => ({ _$litType$: o, strings: e, values: t }), c = $e(1), w = $e(2), S = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), me = /* @__PURE__ */ new WeakMap(), _ = k.createTreeWalker(k, 129);
|
|
| 293 |
-function we(o, e) {
|
|
| 294 |
- if (!re(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
| 295 |
- return ce !== void 0 ? ce.createHTML(e) : e; |
|
| 290 |
+const T = globalThis, ce = (o) => o, N = T.trustedTypes, de = N ? N.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, xe = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, ye = "?" + x, Ne = `<${ye}>`, A = document, P = () => A.createComment(""), U = (o) => o === null || typeof o != "object" && typeof o != "function", oe = Array.isArray, je = (o) => oe(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", I = `[
|
|
| 291 |
+\f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pe = /-->/g, he = />/g, w = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
|
|
| 292 |
+\f\r"'\`<>=]|("|')|))|$)`, "g"), ue = /'/g, ge = /"/g, we = /^(?:script|style|textarea|title)$/i, $e = (o) => (e, ...t) => ({ _$litType$: o, strings: e, values: t }), c = $e(1), $ = $e(2), S = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), me = /* @__PURE__ */ new WeakMap(), _ = A.createTreeWalker(A, 129);
|
|
| 293 |
+function _e(o, e) {
|
|
| 294 |
+ if (!oe(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
| 295 |
+ return de !== void 0 ? de.createHTML(e) : e; |
|
| 296 | 296 |
} |
| 297 | 297 |
const De = (o, e) => {
|
| 298 |
- const t = o.length - 1, i = []; |
|
| 299 |
- let r, n = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = M; |
|
| 298 |
+ const t = o.length - 1, r = []; |
|
| 299 |
+ let i, n = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = z; |
|
| 300 | 300 |
for (let l = 0; l < t; l++) {
|
| 301 | 301 |
const a = o[l]; |
| 302 |
- let d, u, h = -1, v = 0; |
|
| 303 |
- for (; v < a.length && (s.lastIndex = v, u = s.exec(a), u !== null); ) v = s.lastIndex, s === M ? u[1] === "!--" ? s = de : u[1] !== void 0 ? s = he : u[2] !== void 0 ? (ye.test(u[2]) && (r = RegExp("</" + u[2], "g")), s = $) : u[3] !== void 0 && (s = $) : s === $ ? u[0] === ">" ? (s = r ?? M, h = -1) : u[1] === void 0 ? h = -2 : (h = s.lastIndex - u[2].length, d = u[1], s = u[3] === void 0 ? $ : u[3] === '"' ? ue : pe) : s === ue || s === pe ? s = $ : s === de || s === he ? s = M : (s = $, r = void 0);
|
|
| 304 |
- const b = s === $ && o[l + 1].startsWith("/>") ? " " : "";
|
|
| 305 |
- n += s === M ? a + Ne : h >= 0 ? (i.push(d), a.slice(0, h) + be + a.slice(h) + x + b) : a + x + (h === -2 ? l : b); |
|
| 302 |
+ let p, u, h = -1, v = 0; |
|
| 303 |
+ for (; v < a.length && (s.lastIndex = v, u = s.exec(a), u !== null); ) v = s.lastIndex, s === z ? u[1] === "!--" ? s = pe : u[1] !== void 0 ? s = he : u[2] !== void 0 ? (we.test(u[2]) && (i = RegExp("</" + u[2], "g")), s = w) : u[3] !== void 0 && (s = w) : s === w ? u[0] === ">" ? (s = i ?? z, h = -1) : u[1] === void 0 ? h = -2 : (h = s.lastIndex - u[2].length, p = u[1], s = u[3] === void 0 ? w : u[3] === '"' ? ge : ue) : s === ge || s === ue ? s = w : s === pe || s === he ? s = z : (s = w, i = void 0);
|
|
| 304 |
+ const b = s === w && o[l + 1].startsWith("/>") ? " " : "";
|
|
| 305 |
+ n += s === z ? a + Ne : h >= 0 ? (r.push(p), a.slice(0, h) + xe + a.slice(h) + x + b) : a + x + (h === -2 ? l : b); |
|
| 306 | 306 |
} |
| 307 |
- return [we(o, n + (o[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i]; |
|
| 307 |
+ return [_e(o, n + (o[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r]; |
|
| 308 | 308 |
}; |
| 309 | 309 |
class O {
|
| 310 |
- constructor({ strings: e, _$litType$: t }, i) {
|
|
| 311 |
- let r; |
|
| 310 |
+ constructor({ strings: e, _$litType$: t }, r) {
|
|
| 311 |
+ let i; |
|
| 312 | 312 |
this.parts = []; |
| 313 | 313 |
let n = 0, s = 0; |
| 314 |
- const l = e.length - 1, a = this.parts, [d, u] = De(e, t); |
|
| 315 |
- if (this.el = O.createElement(d, i), _.currentNode = this.el.content, t === 2 || t === 3) {
|
|
| 314 |
+ const l = e.length - 1, a = this.parts, [p, u] = De(e, t); |
|
| 315 |
+ if (this.el = O.createElement(p, r), _.currentNode = this.el.content, t === 2 || t === 3) {
|
|
| 316 | 316 |
const h = this.el.content.firstChild; |
| 317 | 317 |
h.replaceWith(...h.childNodes); |
| 318 | 318 |
} |
| 319 |
- for (; (r = _.nextNode()) !== null && a.length < l; ) {
|
|
| 320 |
- if (r.nodeType === 1) {
|
|
| 321 |
- if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(be)) {
|
|
| 322 |
- const v = u[s++], b = r.getAttribute(h).split(x), R = /([.?@])?(.*)/.exec(v); |
|
| 323 |
- a.push({ type: 1, index: n, name: R[2], strings: b, ctor: R[1] === "." ? Le : R[1] === "?" ? Ie : R[1] === "@" ? Ve : D }), r.removeAttribute(h);
|
|
| 324 |
- } else h.startsWith(x) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
|
|
| 325 |
- if (ye.test(r.tagName)) {
|
|
| 326 |
- const h = r.textContent.split(x), v = h.length - 1; |
|
| 319 |
+ for (; (i = _.nextNode()) !== null && a.length < l; ) {
|
|
| 320 |
+ if (i.nodeType === 1) {
|
|
| 321 |
+ if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(xe)) {
|
|
| 322 |
+ const v = u[s++], b = i.getAttribute(h).split(x), H = /([.?@])?(.*)/.exec(v); |
|
| 323 |
+ a.push({ type: 1, index: n, name: H[2], strings: b, ctor: H[1] === "." ? Le : H[1] === "?" ? Ve : H[1] === "@" ? Fe : j }), i.removeAttribute(h);
|
|
| 324 |
+ } else h.startsWith(x) && (a.push({ type: 6, index: n }), i.removeAttribute(h));
|
|
| 325 |
+ if (we.test(i.tagName)) {
|
|
| 326 |
+ const h = i.textContent.split(x), v = h.length - 1; |
|
| 327 | 327 |
if (v > 0) {
|
| 328 |
- r.textContent = B ? B.emptyScript : ""; |
|
| 329 |
- for (let b = 0; b < v; b++) r.append(h[b], P()), _.nextNode(), a.push({ type: 2, index: ++n });
|
|
| 330 |
- r.append(h[v], P()); |
|
| 328 |
+ i.textContent = N ? N.emptyScript : ""; |
|
| 329 |
+ for (let b = 0; b < v; b++) i.append(h[b], P()), _.nextNode(), a.push({ type: 2, index: ++n });
|
|
| 330 |
+ i.append(h[v], P()); |
|
| 331 | 331 |
} |
| 332 | 332 |
} |
| 333 |
- } else if (r.nodeType === 8) if (r.data === xe) a.push({ type: 2, index: n });
|
|
| 333 |
+ } else if (i.nodeType === 8) if (i.data === ye) a.push({ type: 2, index: n });
|
|
| 334 | 334 |
else {
|
| 335 | 335 |
let h = -1; |
| 336 |
- for (; (h = r.data.indexOf(x, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += x.length - 1;
|
|
| 336 |
+ for (; (h = i.data.indexOf(x, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += x.length - 1;
|
|
| 337 | 337 |
} |
| 338 | 338 |
n++; |
| 339 | 339 |
} |
| 340 | 340 |
} |
| 341 | 341 |
static createElement(e, t) {
|
| 342 |
- const i = k.createElement("template");
|
|
| 343 |
- return i.innerHTML = e, i; |
|
| 342 |
+ const r = A.createElement("template");
|
|
| 343 |
+ return r.innerHTML = e, r; |
|
| 344 | 344 |
} |
| 345 | 345 |
} |
| 346 |
-function C(o, e, t = o, i) {
|
|
| 346 |
+function C(o, e, t = o, r) {
|
|
| 347 | 347 |
var s, l; |
| 348 | 348 |
if (e === S) return e; |
| 349 |
- let r = i !== void 0 ? (s = t._$Co) == null ? void 0 : s[i] : t._$Cl; |
|
| 349 |
+ let i = r !== void 0 ? (s = t._$Co) == null ? void 0 : s[r] : t._$Cl; |
|
| 350 | 350 |
const n = U(e) ? void 0 : e._$litDirective$; |
| 351 |
- return (r == null ? void 0 : r.constructor) !== n && ((l = r == null ? void 0 : r._$AO) == null || l.call(r, !1), n === void 0 ? r = void 0 : (r = new n(o), r._$AT(o, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = r : t._$Cl = r), r !== void 0 && (e = C(o, r._$AS(o, e.values), r, i)), e; |
|
| 351 |
+ return (i == null ? void 0 : i.constructor) !== n && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, t, r)), r !== void 0 ? (t._$Co ?? (t._$Co = []))[r] = i : t._$Cl = i), i !== void 0 && (e = C(o, i._$AS(o, e.values), i, r)), e; |
|
| 352 | 352 |
} |
| 353 |
-class je {
|
|
| 353 |
+class Ie {
|
|
| 354 | 354 |
constructor(e, t) {
|
| 355 | 355 |
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t; |
| 356 | 356 |
} |
| ... | ... |
@@ -361,30 +361,30 @@ class je {
|
| 361 | 361 |
return this._$AM._$AU; |
| 362 | 362 |
} |
| 363 | 363 |
u(e) {
|
| 364 |
- const { el: { content: t }, parts: i } = this._$AD, r = ((e == null ? void 0 : e.creationScope) ?? k).importNode(t, !0);
|
|
| 365 |
- _.currentNode = r; |
|
| 366 |
- let n = _.nextNode(), s = 0, l = 0, a = i[0]; |
|
| 364 |
+ const { el: { content: t }, parts: r } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? A).importNode(t, !0);
|
|
| 365 |
+ _.currentNode = i; |
|
| 366 |
+ let n = _.nextNode(), s = 0, l = 0, a = r[0]; |
|
| 367 | 367 |
for (; a !== void 0; ) {
|
| 368 | 368 |
if (s === a.index) {
|
| 369 |
- let d; |
|
| 370 |
- a.type === 2 ? d = new H(n, n.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, e) : a.type === 6 && (d = new Fe(n, this, e)), this._$AV.push(d), a = i[++l]; |
|
| 369 |
+ let p; |
|
| 370 |
+ a.type === 2 ? p = new R(n, n.nextSibling, this, e) : a.type === 1 ? p = new a.ctor(n, a.name, a.strings, this, e) : a.type === 6 && (p = new Ye(n, this, e)), this._$AV.push(p), a = r[++l]; |
|
| 371 | 371 |
} |
| 372 | 372 |
s !== (a == null ? void 0 : a.index) && (n = _.nextNode(), s++); |
| 373 | 373 |
} |
| 374 |
- return _.currentNode = k, r; |
|
| 374 |
+ return _.currentNode = A, i; |
|
| 375 | 375 |
} |
| 376 | 376 |
p(e) {
|
| 377 | 377 |
let t = 0; |
| 378 |
- for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++; |
|
| 378 |
+ for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, t), t += r.strings.length - 2) : r._$AI(e[t])), t++; |
|
| 379 | 379 |
} |
| 380 | 380 |
} |
| 381 |
-class H {
|
|
| 381 |
+class R {
|
|
| 382 | 382 |
get _$AU() {
|
| 383 | 383 |
var e; |
| 384 | 384 |
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv; |
| 385 | 385 |
} |
| 386 |
- constructor(e, t, i, r) {
|
|
| 387 |
- this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0; |
|
| 386 |
+ constructor(e, t, r, i) {
|
|
| 387 |
+ this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0; |
|
| 388 | 388 |
} |
| 389 | 389 |
get parentNode() {
|
| 390 | 390 |
let e = this._$AA.parentNode; |
| ... | ... |
@@ -398,7 +398,7 @@ class H {
|
| 398 | 398 |
return this._$AB; |
| 399 | 399 |
} |
| 400 | 400 |
_$AI(e, t = this) {
|
| 401 |
- e = C(this, e, t), U(e) ? e === m || e == null || e === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Be(e) ? this.k(e) : this._(e); |
|
| 401 |
+ e = C(this, e, t), U(e) ? e === g || e == null || e === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : je(e) ? this.k(e) : this._(e); |
|
| 402 | 402 |
} |
| 403 | 403 |
O(e) {
|
| 404 | 404 |
return this._$AA.parentNode.insertBefore(e, this._$AB); |
| ... | ... |
@@ -407,14 +407,14 @@ class H {
|
| 407 | 407 |
this._$AH !== e && (this._$AR(), this._$AH = this.O(e)); |
| 408 | 408 |
} |
| 409 | 409 |
_(e) {
|
| 410 |
- this._$AH !== m && U(this._$AH) ? this._$AA.nextSibling.data = e : this.T(k.createTextNode(e)), this._$AH = e; |
|
| 410 |
+ this._$AH !== g && U(this._$AH) ? this._$AA.nextSibling.data = e : this.T(A.createTextNode(e)), this._$AH = e; |
|
| 411 | 411 |
} |
| 412 | 412 |
$(e) {
|
| 413 | 413 |
var n; |
| 414 |
- const { values: t, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = O.createElement(we(i.h, i.h[0]), this.options)), i);
|
|
| 415 |
- if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(t); |
|
| 414 |
+ const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = O.createElement(_e(r.h, r.h[0]), this.options)), r);
|
|
| 415 |
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(t); |
|
| 416 | 416 |
else {
|
| 417 |
- const s = new je(r, this), l = s.u(this.options); |
|
| 417 |
+ const s = new Ie(i, this), l = s.u(this.options); |
|
| 418 | 418 |
s.p(t), this.T(l), this._$AH = s; |
| 419 | 419 |
} |
| 420 | 420 |
} |
| ... | ... |
@@ -423,17 +423,17 @@ class H {
|
| 423 | 423 |
return t === void 0 && me.set(e.strings, t = new O(e)), t; |
| 424 | 424 |
} |
| 425 | 425 |
k(e) {
|
| 426 |
- re(this._$AH) || (this._$AH = [], this._$AR()); |
|
| 426 |
+ oe(this._$AH) || (this._$AH = [], this._$AR()); |
|
| 427 | 427 |
const t = this._$AH; |
| 428 |
- let i, r = 0; |
|
| 429 |
- for (const n of e) r === t.length ? t.push(i = new H(this.O(P()), this.O(P()), this, this.options)) : i = t[r], i._$AI(n), r++; |
|
| 430 |
- r < t.length && (this._$AR(i && i._$AB.nextSibling, r), t.length = r); |
|
| 428 |
+ let r, i = 0; |
|
| 429 |
+ for (const n of e) i === t.length ? t.push(r = new R(this.O(P()), this.O(P()), this, this.options)) : r = t[i], r._$AI(n), i++; |
|
| 430 |
+ i < t.length && (this._$AR(r && r._$AB.nextSibling, i), t.length = i); |
|
| 431 | 431 |
} |
| 432 | 432 |
_$AR(e = this._$AA.nextSibling, t) {
|
| 433 |
- var i; |
|
| 434 |
- for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
| 435 |
- const r = le(e).nextSibling; |
|
| 436 |
- le(e).remove(), e = r; |
|
| 433 |
+ var r; |
|
| 434 |
+ for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
| 435 |
+ const i = ce(e).nextSibling; |
|
| 436 |
+ ce(e).remove(), e = i; |
|
| 437 | 437 |
} |
| 438 | 438 |
} |
| 439 | 439 |
setConnected(e) {
|
| ... | ... |
@@ -441,64 +441,64 @@ class H {
|
| 441 | 441 |
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e)); |
| 442 | 442 |
} |
| 443 | 443 |
} |
| 444 |
-class D {
|
|
| 444 |
+class j {
|
|
| 445 | 445 |
get tagName() {
|
| 446 | 446 |
return this.element.tagName; |
| 447 | 447 |
} |
| 448 | 448 |
get _$AU() {
|
| 449 | 449 |
return this._$AM._$AU; |
| 450 | 450 |
} |
| 451 |
- constructor(e, t, i, r, n) {
|
|
| 452 |
- this.type = 1, this._$AH = m, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = m; |
|
| 451 |
+ constructor(e, t, r, i, n) {
|
|
| 452 |
+ this.type = 1, this._$AH = g, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = g; |
|
| 453 | 453 |
} |
| 454 |
- _$AI(e, t = this, i, r) {
|
|
| 454 |
+ _$AI(e, t = this, r, i) {
|
|
| 455 | 455 |
const n = this.strings; |
| 456 | 456 |
let s = !1; |
| 457 | 457 |
if (n === void 0) e = C(this, e, t, 0), s = !U(e) || e !== this._$AH && e !== S, s && (this._$AH = e); |
| 458 | 458 |
else {
|
| 459 | 459 |
const l = e; |
| 460 |
- let a, d; |
|
| 461 |
- for (e = n[0], a = 0; a < n.length - 1; a++) d = C(this, l[i + a], t, a), d === S && (d = this._$AH[a]), s || (s = !U(d) || d !== this._$AH[a]), d === m ? e = m : e !== m && (e += (d ?? "") + n[a + 1]), this._$AH[a] = d; |
|
| 460 |
+ let a, p; |
|
| 461 |
+ for (e = n[0], a = 0; a < n.length - 1; a++) p = C(this, l[r + a], t, a), p === S && (p = this._$AH[a]), s || (s = !U(p) || p !== this._$AH[a]), p === g ? e = g : e !== g && (e += (p ?? "") + n[a + 1]), this._$AH[a] = p; |
|
| 462 | 462 |
} |
| 463 |
- s && !r && this.j(e); |
|
| 463 |
+ s && !i && this.j(e); |
|
| 464 | 464 |
} |
| 465 | 465 |
j(e) {
|
| 466 |
- e === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? ""); |
|
| 466 |
+ e === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? ""); |
|
| 467 | 467 |
} |
| 468 | 468 |
} |
| 469 |
-class Le extends D {
|
|
| 469 |
+class Le extends j {
|
|
| 470 | 470 |
constructor() {
|
| 471 | 471 |
super(...arguments), this.type = 3; |
| 472 | 472 |
} |
| 473 | 473 |
j(e) {
|
| 474 |
- this.element[this.name] = e === m ? void 0 : e; |
|
| 474 |
+ this.element[this.name] = e === g ? void 0 : e; |
|
| 475 | 475 |
} |
| 476 | 476 |
} |
| 477 |
-class Ie extends D {
|
|
| 477 |
+class Ve extends j {
|
|
| 478 | 478 |
constructor() {
|
| 479 | 479 |
super(...arguments), this.type = 4; |
| 480 | 480 |
} |
| 481 | 481 |
j(e) {
|
| 482 |
- this.element.toggleAttribute(this.name, !!e && e !== m); |
|
| 482 |
+ this.element.toggleAttribute(this.name, !!e && e !== g); |
|
| 483 | 483 |
} |
| 484 | 484 |
} |
| 485 |
-class Ve extends D {
|
|
| 486 |
- constructor(e, t, i, r, n) {
|
|
| 487 |
- super(e, t, i, r, n), this.type = 5; |
|
| 485 |
+class Fe extends j {
|
|
| 486 |
+ constructor(e, t, r, i, n) {
|
|
| 487 |
+ super(e, t, r, i, n), this.type = 5; |
|
| 488 | 488 |
} |
| 489 | 489 |
_$AI(e, t = this) {
|
| 490 |
- if ((e = C(this, e, t, 0) ?? m) === S) return; |
|
| 491 |
- const i = this._$AH, r = e === m && i !== m || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, n = e !== m && (i === m || r); |
|
| 492 |
- r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, e), this._$AH = e; |
|
| 490 |
+ if ((e = C(this, e, t, 0) ?? g) === S) return; |
|
| 491 |
+ const r = this._$AH, i = e === g && r !== g || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, n = e !== g && (r === g || i); |
|
| 492 |
+ i && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, e), this._$AH = e; |
|
| 493 | 493 |
} |
| 494 | 494 |
handleEvent(e) {
|
| 495 | 495 |
var t; |
| 496 | 496 |
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e); |
| 497 | 497 |
} |
| 498 | 498 |
} |
| 499 |
-class Fe {
|
|
| 500 |
- constructor(e, t, i) {
|
|
| 501 |
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i; |
|
| 499 |
+class Ye {
|
|
| 500 |
+ constructor(e, t, r) {
|
|
| 501 |
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = r; |
|
| 502 | 502 |
} |
| 503 | 503 |
get _$AU() {
|
| 504 | 504 |
return this._$AM._$AU; |
| ... | ... |
@@ -507,24 +507,24 @@ class Fe {
|
| 507 | 507 |
C(this, e); |
| 508 | 508 |
} |
| 509 | 509 |
} |
| 510 |
-const I = z.litHtmlPolyfillSupport; |
|
| 511 |
-I == null || I(O, H), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.3.2");
|
|
| 512 |
-const We = (o, e, t) => {
|
|
| 513 |
- const i = (t == null ? void 0 : t.renderBefore) ?? e; |
|
| 514 |
- let r = i._$litPart$; |
|
| 515 |
- if (r === void 0) {
|
|
| 510 |
+const L = T.litHtmlPolyfillSupport; |
|
| 511 |
+L == null || L(O, R), (T.litHtmlVersions ?? (T.litHtmlVersions = [])).push("3.3.2");
|
|
| 512 |
+const qe = (o, e, t) => {
|
|
| 513 |
+ const r = (t == null ? void 0 : t.renderBefore) ?? e; |
|
| 514 |
+ let i = r._$litPart$; |
|
| 515 |
+ if (i === void 0) {
|
|
| 516 | 516 |
const n = (t == null ? void 0 : t.renderBefore) ?? null; |
| 517 |
- i._$litPart$ = r = new H(e.insertBefore(P(), n), n, void 0, t ?? {});
|
|
| 517 |
+ r._$litPart$ = i = new R(e.insertBefore(P(), n), n, void 0, t ?? {});
|
|
| 518 | 518 |
} |
| 519 |
- return r._$AI(o), r; |
|
| 519 |
+ return i._$AI(o), i; |
|
| 520 | 520 |
}; |
| 521 | 521 |
/** |
| 522 | 522 |
* @license |
| 523 | 523 |
* Copyright 2017 Google LLC |
| 524 | 524 |
* SPDX-License-Identifier: BSD-3-Clause |
| 525 | 525 |
*/ |
| 526 |
-const A = globalThis; |
|
| 527 |
-class g extends E {
|
|
| 526 |
+const k = globalThis; |
|
| 527 |
+class m extends E {
|
|
| 528 | 528 |
constructor() {
|
| 529 | 529 |
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
| 530 | 530 |
} |
| ... | ... |
@@ -535,7 +535,7 @@ class g extends E {
|
| 535 | 535 |
} |
| 536 | 536 |
update(e) {
|
| 537 | 537 |
const t = this.render(); |
| 538 |
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = We(t, this.renderRoot, this.renderOptions); |
|
| 538 |
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = qe(t, this.renderRoot, this.renderOptions); |
|
| 539 | 539 |
} |
| 540 | 540 |
connectedCallback() {
|
| 541 | 541 |
var e; |
| ... | ... |
@@ -549,12 +549,12 @@ class g extends E {
|
| 549 | 549 |
return S; |
| 550 | 550 |
} |
| 551 | 551 |
} |
| 552 |
-var ge; |
|
| 553 |
-g._$litElement$ = !0, g.finalized = !0, (ge = A.litElementHydrateSupport) == null || ge.call(A, { LitElement: g });
|
|
| 554 |
-const V = A.litElementPolyfillSupport; |
|
| 555 |
-V == null || V({ LitElement: g });
|
|
| 556 |
-(A.litElementVersions ?? (A.litElementVersions = [])).push("4.2.2");
|
|
| 557 |
-class W extends g {
|
|
| 552 |
+var fe; |
|
| 553 |
+m._$litElement$ = !0, m.finalized = !0, (fe = k.litElementHydrateSupport) == null || fe.call(k, { LitElement: m });
|
|
| 554 |
+const V = k.litElementPolyfillSupport; |
|
| 555 |
+V == null || V({ LitElement: m });
|
|
| 556 |
+(k.litElementVersions ?? (k.litElementVersions = [])).push("4.2.2");
|
|
| 557 |
+class Y extends m {
|
|
| 558 | 558 |
render() {
|
| 559 | 559 |
return c` |
| 560 | 560 |
${this.imageUrl ? c`<img class="card-image" src="${this.imageUrl}" alt="${this.imageAlt || ""}" />` : ""}
|
| ... | ... |
@@ -569,7 +569,7 @@ class W extends g {
|
| 569 | 569 |
`; |
| 570 | 570 |
} |
| 571 | 571 |
} |
| 572 |
-p(W, "styles", f` |
|
| 572 |
+d(Y, "styles", f` |
|
| 573 | 573 |
:host {
|
| 574 | 574 |
--luumicore-card-bg: var(--luumicore-secondary, #fff); |
| 575 | 575 |
--luumicore-card-border-color: var(--luumicore-secondary, #fff); |
| ... | ... |
@@ -611,12 +611,12 @@ p(W, "styles", f` |
| 611 | 611 |
border-top: 1px solid var(--luumicore-border-color, #ddd); |
| 612 | 612 |
background-color: var(--luumicore-footer-bg, #f8f9fa); |
| 613 | 613 |
} |
| 614 |
- `), p(W, "properties", {
|
|
| 614 |
+ `), d(Y, "properties", {
|
|
| 615 | 615 |
imageUrl: { type: String, attribute: "image-url" },
|
| 616 | 616 |
imageAlt: { type: String, attribute: "image-alt" }
|
| 617 | 617 |
}); |
| 618 |
-customElements.define("luumicore-card", W);
|
|
| 619 |
-class _e extends g {
|
|
| 618 |
+customElements.define("luumicore-card", Y);
|
|
| 619 |
+class ke extends m {
|
|
| 620 | 620 |
render() {
|
| 621 | 621 |
return c` |
| 622 | 622 |
<ul> |
| ... | ... |
@@ -625,7 +625,7 @@ class _e extends g {
|
| 625 | 625 |
`; |
| 626 | 626 |
} |
| 627 | 627 |
} |
| 628 |
-p(_e, "styles", f` |
|
| 628 |
+d(ke, "styles", f` |
|
| 629 | 629 |
:host {
|
| 630 | 630 |
display: block; |
| 631 | 631 |
} |
| ... | ... |
@@ -639,8 +639,8 @@ p(_e, "styles", f` |
| 639 | 639 |
overflow: hidden; |
| 640 | 640 |
} |
| 641 | 641 |
`); |
| 642 |
-customElements.define("luumicore-list", _e);
|
|
| 643 |
-class Ae extends g {
|
|
| 642 |
+customElements.define("luumicore-list", ke);
|
|
| 643 |
+class Ae extends m {
|
|
| 644 | 644 |
render() {
|
| 645 | 645 |
return c` |
| 646 | 646 |
<div class="item-container"> |
| ... | ... |
@@ -659,7 +659,7 @@ class Ae extends g {
|
| 659 | 659 |
`; |
| 660 | 660 |
} |
| 661 | 661 |
} |
| 662 |
-p(Ae, "styles", f` |
|
| 662 |
+d(Ae, "styles", f` |
|
| 663 | 663 |
:host {
|
| 664 | 664 |
display: block; |
| 665 | 665 |
border-bottom: 1px solid var(--luumicore-border-color, #ddd); |
| ... | ... |
@@ -693,7 +693,7 @@ p(Ae, "styles", f` |
| 693 | 693 |
} |
| 694 | 694 |
`); |
| 695 | 695 |
customElements.define("luumicore-list-item", Ae);
|
| 696 |
-class q extends g {
|
|
| 696 |
+class q extends m {
|
|
| 697 | 697 |
_getIcon(e) {
|
| 698 | 698 |
const t = e.toLowerCase(); |
| 699 | 699 |
return t === "pdf" ? c`<svg class="type-pdf" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><path d="M9 15l3 3 3-3"></path><path d="M12 18v-6"></path><text x="6" y="22" font-size="6" font-weight="bold" fill="currentColor" stroke="none">PDF</text></svg>` : t === "docx" || t === "doc" ? c`<svg class="type-doc" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><line x1="10" y1="9" x2="8" y2="9"></line></svg>` : c`<svg class="type-default" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>`; |
| ... | ... |
@@ -709,7 +709,12 @@ class q extends g {
|
| 709 | 709 |
|
| 710 | 710 |
<div class="file-info"> |
| 711 | 711 |
<div class="file-name">${this.file.name}</div>
|
| 712 |
- <div class="file-meta">${this.file.date} ${this.file.size}</div>
|
|
| 712 |
+ <div class="file-meta-row"> |
|
| 713 |
+ <div class="file-meta">${this.file.date} ${this.file.size}</div>
|
|
| 714 |
+ <div class="tags-container"> |
|
| 715 |
+ <slot name="tags"></slot> |
|
| 716 |
+ </div> |
|
| 717 |
+ </div> |
|
| 713 | 718 |
</div> |
| 714 | 719 |
|
| 715 | 720 |
<div class="download-btn"> |
| ... | ... |
@@ -719,10 +724,10 @@ class q extends g {
|
| 719 | 724 |
`; |
| 720 | 725 |
} |
| 721 | 726 |
} |
| 722 |
-p(q, "properties", {
|
|
| 727 |
+d(q, "properties", {
|
|
| 723 | 728 |
file: { type: Object }
|
| 724 | 729 |
// { name, date, size, type, isNew }
|
| 725 |
-}), p(q, "styles", f` |
|
| 730 |
+}), d(q, "styles", f` |
|
| 726 | 731 |
:host {
|
| 727 | 732 |
display: block; |
| 728 | 733 |
margin-bottom: 12px; |
| ... | ... |
@@ -736,6 +741,7 @@ p(q, "properties", {
|
| 736 | 741 |
border: 1px solid var(--border-color); |
| 737 | 742 |
box-shadow: var(--shadow-sm); |
| 738 | 743 |
position: relative; |
| 744 |
+ flex-wrap: wrap; |
|
| 739 | 745 |
} |
| 740 | 746 |
|
| 741 | 747 |
/* UPDATE: Styling für neue Dateien (Weißer BG + Farbiger Rand) */ |
| ... | ... |
@@ -775,9 +781,19 @@ p(q, "properties", {
|
| 775 | 781 |
font-weight: 700; |
| 776 | 782 |
} |
| 777 | 783 |
|
| 784 |
+ .file-meta-row {
|
|
| 785 |
+ display: flex; |
|
| 786 |
+ align-items: center; |
|
| 787 |
+ gap: 12px; |
|
| 788 |
+ flex-wrap: wrap; |
|
| 789 |
+ } |
|
| 790 |
+ |
|
| 778 | 791 |
.file-meta {
|
| 779 | 792 |
font-size: 0.75rem; |
| 780 | 793 |
color: var(--text-muted); |
| 794 |
+ line-height: 1; /* Ensure consistent height */ |
|
| 795 |
+ display: flex; |
|
| 796 |
+ align-items: center; |
|
| 781 | 797 |
} |
| 782 | 798 |
.download-btn {
|
| 783 | 799 |
width: 36px; |
| ... | ... |
@@ -833,31 +849,39 @@ p(q, "properties", {
|
| 833 | 849 |
.type-pdf { color: var(--alert-color); }
|
| 834 | 850 |
.type-doc { color: #2b5797; } /* Word blueish */
|
| 835 | 851 |
.type-default { color: var(--text-muted); }
|
| 852 |
+ |
|
| 853 |
+ /* Slot for tags */ |
|
| 854 |
+ .tags-container {
|
|
| 855 |
+ display: flex; |
|
| 856 |
+ align-items: center; /* Ensure tags are vertically centered */ |
|
| 857 |
+ gap: 8px; |
|
| 858 |
+ flex-wrap: wrap; |
|
| 859 |
+ } |
|
| 836 | 860 |
`); |
| 837 | 861 |
customElements.define("winzer-file-card", q);
|
| 838 |
-class G extends g {
|
|
| 862 |
+class W extends m {
|
|
| 839 | 863 |
_timeToGridRow(e) {
|
| 840 | 864 |
if (!e) return 1; |
| 841 |
- const [t, i] = e.split(":").map(Number);
|
|
| 842 |
- return t * 4 + Math.floor(i / 15) + 1; |
|
| 865 |
+ const [t, r] = e.split(":").map(Number);
|
|
| 866 |
+ return t * 4 + Math.floor(r / 15) + 1; |
|
| 843 | 867 |
} |
| 844 | 868 |
_formatNumber(e) {
|
| 845 | 869 |
return new Intl.NumberFormat("de-DE").format(e);
|
| 846 | 870 |
} |
| 847 | 871 |
render() {
|
| 848 |
- const e = Array.from({ length: 24 }, (t, i) => i);
|
|
| 872 |
+ const e = Array.from({ length: 24 }, (t, r) => r);
|
|
| 849 | 873 |
return c`<div class="scroll-container"><div class="day-grid">${e.map((t) => c`<div class="time-label" style="grid-row: ${t * 4 + 1}">${t.toString().padStart(2, "0")}:00</div>`)}${this.events ? this.events.map((t) => {
|
| 850 |
- const i = this._timeToGridRow(t.start), r = this._timeToGridRow(t.end), s = r - i <= 2, l = t.total && t.booked >= t.total; |
|
| 851 |
- let a = "", d = c``; |
|
| 874 |
+ const r = this._timeToGridRow(t.start), i = this._timeToGridRow(t.end), s = i - r <= 2, l = t.total && t.booked >= t.total; |
|
| 875 |
+ let a = "", p = c``; |
|
| 852 | 876 |
if (t.total && t.total > 0) {
|
| 853 | 877 |
const u = Math.min(100, Math.round(t.booked / t.total * 100)); |
| 854 |
- a = `${this._formatNumber(t.booked)} / ${this._formatNumber(t.total)} kg`, d = c`<div class="progress-track"><div class="progress-fill" style="width: ${u}%;"></div></div>`;
|
|
| 878 |
+ a = `${this._formatNumber(t.booked)} / ${this._formatNumber(t.total)} kg`, p = c`<div class="progress-track"><div class="progress-fill" style="width: ${u}%;"></div></div>`;
|
|
| 855 | 879 |
} |
| 856 |
- return c`<div class="event-item ${s ? "short-event" : ""} ${l ? "fully-booked" : ""}" style="grid-row: ${i} / ${r};" title="${t.title}"><div class="event-title">${t.title}</div><div class="event-details-row">${l ? c`<span class="badge-booked-out">Ausgebucht</span>` : ""}${!s || !l ? c`<span class="capacity-text">${a}</span>` : ""}${s && a ? "" : c`<span style="margin-left:8px;">${t.start} - ${t.end}</span>`}</div>${d}</div>`;
|
|
| 880 |
+ return c`<div class="event-item ${s ? "short-event" : ""} ${l ? "fully-booked" : ""}" style="grid-row: ${r} / ${i};" title="${t.title}"><div class="event-title">${t.title}</div><div class="event-details-row">${l ? c`<span class="badge-booked-out">Ausgebucht</span>` : ""}${!s || !l ? c`<span class="capacity-text">${a}</span>` : ""}${s && a ? "" : c`<span style="margin-left:8px;">${t.start} - ${t.end}</span>`}</div>${p}</div>`;
|
|
| 857 | 881 |
}) : ""}<div class="grid-spacer"></div></div></div>`; |
| 858 | 882 |
} |
| 859 | 883 |
} |
| 860 |
-p(G, "properties", { events: { type: Array } }), p(G, "styles", f`
|
|
| 884 |
+d(W, "properties", { events: { type: Array } }), d(W, "styles", f`
|
|
| 861 | 885 |
:host { display: block; background: var(--bg-white); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); overflow: hidden; height: 600px; display: flex; flex-direction: column; }
|
| 862 | 886 |
.scroll-container { flex: 1; overflow-y: auto; position: relative; }
|
| 863 | 887 |
.day-grid { display: grid; grid-template-columns: 50px 1fr; grid-auto-rows: 20px; background-image: linear-gradient(to bottom, var(--border-color) 1px, transparent 1px); background-size: 100% 80px; background-attachment: local; }
|
| ... | ... |
@@ -879,8 +903,8 @@ p(G, "properties", { events: { type: Array } }), p(G, "styles", f`
|
| 879 | 903 |
.event-item.short-event .progress-fill { border-radius: 0; }
|
| 880 | 904 |
.grid-spacer { grid-column: 1 / -1; grid-row: 97; height: 20px; }
|
| 881 | 905 |
`); |
| 882 |
-customElements.define("winzer-day-view", G);
|
|
| 883 |
-class Y extends g {
|
|
| 906 |
+customElements.define("winzer-day-view", W);
|
|
| 907 |
+class G extends m {
|
|
| 884 | 908 |
_handleItemClick(e) {
|
| 885 | 909 |
this.dispatchEvent(new CustomEvent("item-click", { detail: { action: e.action, label: e.label }, bubbles: !0, composed: !0 }));
|
| 886 | 910 |
} |
| ... | ... |
@@ -888,7 +912,7 @@ class Y extends g {
|
| 888 | 912 |
return !this.items || this.items.length === 0 ? c`` : c`<div class="menu-group">${this.items.map((e) => c`<div class="menu-item" @click="${() => this._handleItemClick(e)}"><div class="menu-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${e.icon}</svg></div><span>${e.label}</span><svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 18l6-6-6-6"/></svg></div>`)}</div>`;
|
| 889 | 913 |
} |
| 890 | 914 |
} |
| 891 |
-p(Y, "properties", { items: { type: Array } }), p(Y, "styles", f`
|
|
| 915 |
+d(G, "properties", { items: { type: Array } }), d(G, "styles", f`
|
|
| 892 | 916 |
:host { display: block; margin-bottom: 20px; }
|
| 893 | 917 |
.menu-group { background-color: var(--bg-card); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
|
| 894 | 918 |
.menu-item { display: flex; align-items: center; padding: 16px 20px; cursor: pointer; background: var(--bg-white); border-bottom: 1px solid var(--border-color); font-size: 0.95rem; font-weight: 600; color: var(--text-dark); }
|
| ... | ... |
@@ -898,8 +922,8 @@ p(Y, "properties", { items: { type: Array } }), p(Y, "styles", f`
|
| 898 | 922 |
.menu-icon svg { width: 100%; height: 100%; display: block; }
|
| 899 | 923 |
.chevron { margin-left: auto; color: var(--primary-color); width: 18px; height: 18px; }
|
| 900 | 924 |
`); |
| 901 |
-customElements.define("winzer-menu-group", Y);
|
|
| 902 |
-class Z extends g {
|
|
| 925 |
+customElements.define("winzer-menu-group", G);
|
|
| 926 |
+class Z extends m {
|
|
| 903 | 927 |
_close() {
|
| 904 | 928 |
this.dispatchEvent(new CustomEvent("close"));
|
| 905 | 929 |
} |
| ... | ... |
@@ -907,7 +931,7 @@ class Z extends g {
|
| 907 | 931 |
return c`<div class="backdrop" @click="${(e) => e.target.classList.contains("backdrop") && this._close()}"><div class="modal-container"><div class="modal-header"><span>${this.title}</span><div class="close-btn" @click="${this._close}"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></div></div><slot></slot></div></div>`;
|
| 908 | 932 |
} |
| 909 | 933 |
} |
| 910 |
-p(Z, "properties", { open: { type: Boolean }, title: { type: String } }), p(Z, "styles", f`
|
|
| 934 |
+d(Z, "properties", { open: { type: Boolean }, title: { type: String } }), d(Z, "styles", f`
|
|
| 911 | 935 |
:host { display: block; }
|
| 912 | 936 |
.backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(var(--primary-rgb), 0.85); backdrop-filter: blur(4px); z-index: 1000; display: flex; justify-content: center; align-items: flex-start; padding-top: 120px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
|
| 913 | 937 |
:host([open]) .backdrop { opacity: 1; pointer-events: all; }
|
| ... | ... |
@@ -918,12 +942,32 @@ p(Z, "properties", { open: { type: Boolean }, title: { type: String } }), p(Z, "
|
| 918 | 942 |
.close-btn svg { width: 20px; height: 20px; stroke: var(--primary-color); stroke-width: 2; }
|
| 919 | 943 |
`); |
| 920 | 944 |
customElements.define("winzer-modal", Z);
|
| 921 |
-class K extends g {
|
|
| 945 |
+class K extends m {
|
|
| 922 | 946 |
render() {
|
| 923 |
- return c`<div class="card ${this.featured ? "featured" : ""}"><div class="header"><span>${this.category}</span><span>${this.date}</span></div><h3>${this.title}</h3><p>${this.text}</p>${this.hasAttachment ? c`<div class="attachment-icon"><svg viewBox="0 0 24 24"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></svg></div>` : ""}<div class="action-btn"><svg viewBox="0 0 24 24"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg></div></div>`;
|
|
| 947 |
+ return c` |
|
| 948 |
+ <div class="card ${this.featured ? "featured" : ""}">
|
|
| 949 |
+ <div class="header"><span>${this.category}</span><span>${this.date}</span></div>
|
|
| 950 |
+ <h3>${this.title}</h3>
|
|
| 951 |
+ <p>${this.text}</p>
|
|
| 952 |
+ |
|
| 953 |
+ <div class="tags-container"> |
|
| 954 |
+ <slot name="tags"></slot> |
|
| 955 |
+ </div> |
|
| 956 |
+ |
|
| 957 |
+ ${this.hasAttachment ? c`<div class="attachment-icon"><svg viewBox="0 0 24 24"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></svg></div>` : ""}
|
|
| 958 |
+ <div class="action-btn"><svg viewBox="0 0 24 24"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg></div> |
|
| 959 |
+ </div> |
|
| 960 |
+ `; |
|
| 924 | 961 |
} |
| 925 | 962 |
} |
| 926 |
-p(K, "properties", { category: { type: String }, date: { type: String }, title: { type: String }, text: { type: String }, hasAttachment: { type: Boolean }, featured: { type: Boolean } }), p(K, "styles", f`
|
|
| 963 |
+d(K, "properties", {
|
|
| 964 |
+ category: { type: String },
|
|
| 965 |
+ date: { type: String },
|
|
| 966 |
+ title: { type: String },
|
|
| 967 |
+ text: { type: String },
|
|
| 968 |
+ hasAttachment: { type: Boolean },
|
|
| 969 |
+ featured: { type: Boolean }
|
|
| 970 |
+}), d(K, "styles", f` |
|
| 927 | 971 |
:host { display: block; margin-bottom: 35px; }
|
| 928 | 972 |
.card { background-color: var(--bg-card); border-radius: var(--radius-card); padding: 20px 20px 40px 20px; position: relative; color: var(--text-main); display: block; }
|
| 929 | 973 |
.card.featured { border: 1px solid var(--primary-color); background-color: var(--primary-light); }
|
| ... | ... |
@@ -934,9 +978,146 @@ p(K, "properties", { category: { type: String }, date: { type: String }, title:
|
| 934 | 978 |
.action-btn { position: absolute; bottom: -20px; right: 20px; background-color: var(--primary-color); color: var(--bg-white); width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); cursor: pointer; transition: transform 0.1s; z-index: 10; }
|
| 935 | 979 |
.action-btn:active { transform: scale(0.95); }
|
| 936 | 980 |
svg { width: 24px; height: 24px; fill: currentColor; }
|
| 981 |
+ |
|
| 982 |
+ /* Slot for tags */ |
|
| 983 |
+ .tags-container {
|
|
| 984 |
+ display: flex; |
|
| 985 |
+ gap: 8px; |
|
| 986 |
+ margin-top: 12px; |
|
| 987 |
+ flex-wrap: wrap; |
|
| 988 |
+ } |
|
| 937 | 989 |
`); |
| 938 | 990 |
customElements.define("winzer-card", K);
|
| 939 |
-class J extends g {
|
|
| 991 |
+class J extends m {
|
|
| 992 |
+ constructor() {
|
|
| 993 |
+ super(), this.variant = "solid", this.size = "sm", this.removable = !1, this.clickable = !1; |
|
| 994 |
+ } |
|
| 995 |
+ _handleRemove(e) {
|
|
| 996 |
+ e.stopPropagation(), this.dispatchEvent(new CustomEvent("remove", { bubbles: !0, composed: !0 }));
|
|
| 997 |
+ } |
|
| 998 |
+ render() {
|
|
| 999 |
+ const e = [ |
|
| 1000 |
+ "tag", |
|
| 1001 |
+ this.variant || "solid", |
|
| 1002 |
+ this.size || "sm", |
|
| 1003 |
+ this.color || "", |
|
| 1004 |
+ this.clickable ? "clickable" : "" |
|
| 1005 |
+ ].filter(Boolean).join(" ");
|
|
| 1006 |
+ return c` |
|
| 1007 |
+ <div class="${e}">
|
|
| 1008 |
+ <slot name="icon"></slot> |
|
| 1009 |
+ <span>${this.label}</span>
|
|
| 1010 |
+ <slot></slot> |
|
| 1011 |
+ ${this.removable ? c`
|
|
| 1012 |
+ <span class="remove-btn" @click="${this._handleRemove}">
|
|
| 1013 |
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg> |
|
| 1014 |
+ </span> |
|
| 1015 |
+ ` : ""} |
|
| 1016 |
+ </div> |
|
| 1017 |
+ `; |
|
| 1018 |
+ } |
|
| 1019 |
+} |
|
| 1020 |
+d(J, "properties", {
|
|
| 1021 |
+ label: { type: String },
|
|
| 1022 |
+ color: { type: String },
|
|
| 1023 |
+ // 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark' |
|
| 1024 |
+ variant: { type: String },
|
|
| 1025 |
+ // 'solid' (default), 'outline' |
|
| 1026 |
+ size: { type: String },
|
|
| 1027 |
+ // 'xs', 'sm' (default), 'md' |
|
| 1028 |
+ removable: { type: Boolean },
|
|
| 1029 |
+ clickable: { type: Boolean }
|
|
| 1030 |
+}), d(J, "styles", f` |
|
| 1031 |
+ :host {
|
|
| 1032 |
+ display: inline-flex; |
|
| 1033 |
+ vertical-align: middle; |
|
| 1034 |
+ line-height: 0; |
|
| 1035 |
+ } |
|
| 1036 |
+ .tag {
|
|
| 1037 |
+ display: flex; |
|
| 1038 |
+ align-items: center; |
|
| 1039 |
+ border-radius: 4px; |
|
| 1040 |
+ font-weight: 600; |
|
| 1041 |
+ line-height: normal; |
|
| 1042 |
+ white-space: nowrap; |
|
| 1043 |
+ border: 1px solid transparent; |
|
| 1044 |
+ gap: 4px; |
|
| 1045 |
+ transition: all 0.2s ease; |
|
| 1046 |
+ box-sizing: border-box; |
|
| 1047 |
+ } |
|
| 1048 |
+ |
|
| 1049 |
+ /* Sizes */ |
|
| 1050 |
+ .tag.xs { padding: 2px 6px; font-size: 0.65rem; border-radius: 3px; }
|
|
| 1051 |
+ .tag.sm { padding: 4px 8px; font-size: 0.75rem; }
|
|
| 1052 |
+ .tag.md { padding: 6px 10px; font-size: 0.85rem; }
|
|
| 1053 |
+ |
|
| 1054 |
+ /* Clickable */ |
|
| 1055 |
+ .tag.clickable { cursor: pointer; }
|
|
| 1056 |
+ .tag.clickable:hover { opacity: 0.9; transform: translateY(-1px); }
|
|
| 1057 |
+ .tag.clickable:active { transform: translateY(0); }
|
|
| 1058 |
+ |
|
| 1059 |
+ /* Solid Variants */ |
|
| 1060 |
+ .tag.solid { background-color: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }
|
|
| 1061 |
+ .tag.solid.primary { background-color: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); }
|
|
| 1062 |
+ .tag.solid.secondary { background-color: var(--secondary-light); color: var(--secondary-color); border-color: var(--secondary-color); }
|
|
| 1063 |
+ .tag.solid.success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
|
|
| 1064 |
+ .tag.solid.danger { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
|
|
| 1065 |
+ .tag.solid.warning { background-color: #fff3cd; color: #856404; border-color: #ffeeba; }
|
|
| 1066 |
+ .tag.solid.info { background-color: #d1ecf1; color: #0c5460; border-color: #bee5eb; }
|
|
| 1067 |
+ .tag.solid.light { background-color: #fefefe; color: #818182; border-color: #fdfdfe; }
|
|
| 1068 |
+ .tag.solid.dark { background-color: #d6d8d9; color: #1b1e21; border-color: #c6c8ca; }
|
|
| 1069 |
+ |
|
| 1070 |
+ /* Outline Variants */ |
|
| 1071 |
+ .tag.outline { background-color: transparent; }
|
|
| 1072 |
+ .tag.outline.primary { color: var(--primary-color); border-color: var(--primary-color); }
|
|
| 1073 |
+ .tag.outline.secondary { color: var(--secondary-color); border-color: var(--secondary-color); }
|
|
| 1074 |
+ .tag.outline.success { color: #28a745; border-color: #28a745; }
|
|
| 1075 |
+ .tag.outline.danger { color: #dc3545; border-color: #dc3545; }
|
|
| 1076 |
+ .tag.outline.warning { color: #ffc107; border-color: #ffc107; }
|
|
| 1077 |
+ .tag.outline.info { color: #17a2b8; border-color: #17a2b8; }
|
|
| 1078 |
+ .tag.outline.light { color: #f8f9fa; border-color: #f8f9fa; }
|
|
| 1079 |
+ .tag.outline.dark { color: #343a40; border-color: #343a40; }
|
|
| 1080 |
+ |
|
| 1081 |
+ /* Icon Slot Styling */ |
|
| 1082 |
+ ::slotted(svg) {
|
|
| 1083 |
+ width: 12px; |
|
| 1084 |
+ height: 12px; |
|
| 1085 |
+ fill: currentColor; |
|
| 1086 |
+ display: block; |
|
| 1087 |
+ } |
|
| 1088 |
+ .tag.xs ::slotted(svg) {
|
|
| 1089 |
+ width: 10px; |
|
| 1090 |
+ height: 10px; |
|
| 1091 |
+ } |
|
| 1092 |
+ .tag.md ::slotted(svg) {
|
|
| 1093 |
+ width: 14px; |
|
| 1094 |
+ height: 14px; |
|
| 1095 |
+ } |
|
| 1096 |
+ |
|
| 1097 |
+ /* Remove Button */ |
|
| 1098 |
+ .remove-btn {
|
|
| 1099 |
+ display: inline-flex; |
|
| 1100 |
+ align-items: center; |
|
| 1101 |
+ justify-content: center; |
|
| 1102 |
+ margin-left: 2px; |
|
| 1103 |
+ cursor: pointer; |
|
| 1104 |
+ opacity: 0.6; |
|
| 1105 |
+ transition: opacity 0.2s; |
|
| 1106 |
+ border-radius: 50%; |
|
| 1107 |
+ width: 14px; |
|
| 1108 |
+ height: 14px; |
|
| 1109 |
+ } |
|
| 1110 |
+ .tag.xs .remove-btn {
|
|
| 1111 |
+ width: 10px; |
|
| 1112 |
+ height: 10px; |
|
| 1113 |
+ margin-left: 1px; |
|
| 1114 |
+ } |
|
| 1115 |
+ .remove-btn:hover { opacity: 1; background-color: rgba(0,0,0,0.1); }
|
|
| 1116 |
+ .remove-btn svg { width: 10px; height: 10px; stroke-width: 3; }
|
|
| 1117 |
+ .tag.xs .remove-btn svg { width: 8px; height: 8px; }
|
|
| 1118 |
+ `); |
|
| 1119 |
+customElements.define("winzer-tag", J);
|
|
| 1120 |
+class X extends m {
|
|
| 940 | 1121 |
_handleUserClick() {
|
| 941 | 1122 |
this.dispatchEvent(new CustomEvent("user-click", { bubbles: !0, composed: !0 }));
|
| 942 | 1123 |
} |
| ... | ... |
@@ -944,7 +1125,7 @@ class J extends g {
|
| 944 | 1125 |
return c`<div class="top-bar"><div class="logo-placeholder"><span>luumi</span><span>CORE</span></div><div class="title-group"><div class="main-title">${this.mainTitle || ""}</div><div class="sub-title">${this.subTitle || ""}</div></div><svg class="user-icon" @click="${this._handleUserClick}" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2"/></svg></div>`;
|
| 945 | 1126 |
} |
| 946 | 1127 |
} |
| 947 |
-p(J, "properties", { mainTitle: { type: String, attribute: "main-title" }, subTitle: { type: String, attribute: "sub-title" } }), p(J, "styles", f`
|
|
| 1128 |
+d(X, "properties", { mainTitle: { type: String, attribute: "main-title" }, subTitle: { type: String, attribute: "sub-title" } }), d(X, "styles", f`
|
|
| 948 | 1129 |
:host { display: block; background: var(--bg-white); padding: 10px 20px; border-bottom: 1px solid var(--border-color); }
|
| 949 | 1130 |
.top-bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
|
| 950 | 1131 |
.logo-placeholder { border: 1px solid var(--primary-color); width: 40px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 8px; color: var(--primary-color); font-weight: bold; line-height: 1; }
|
| ... | ... |
@@ -953,8 +1134,8 @@ p(J, "properties", { mainTitle: { type: String, attribute: "main-title" }, subTi
|
| 953 | 1134 |
.sub-title { font-size: 0.9rem; color: var(--primary-color); }
|
| 954 | 1135 |
.user-icon { width: 32px; height: 32px; color: var(--text-main); cursor: pointer; }
|
| 955 | 1136 |
`); |
| 956 |
-customElements.define("winzer-header", J);
|
|
| 957 |
-class X extends g {
|
|
| 1137 |
+customElements.define("winzer-header", X);
|
|
| 1138 |
+class Q extends m {
|
|
| 958 | 1139 |
constructor() {
|
| 959 | 1140 |
super(), this.items = []; |
| 960 | 1141 |
} |
| ... | ... |
@@ -971,24 +1152,24 @@ class X extends g {
|
| 971 | 1152 |
`; |
| 972 | 1153 |
} |
| 973 | 1154 |
} |
| 974 |
-p(X, "properties", {
|
|
| 1155 |
+d(Q, "properties", {
|
|
| 975 | 1156 |
activeTab: { type: String },
|
| 976 | 1157 |
items: { type: Array }
|
| 977 | 1158 |
// [{ id: 'news', label: 'News', icon: '...', url: '/news' }]
|
| 978 |
-}), p(X, "styles", f` |
|
| 1159 |
+}), d(Q, "styles", f` |
|
| 979 | 1160 |
:host { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--bg-white); border-top: 1px solid var(--border-color); padding-bottom: env(safe-area-inset-bottom); z-index: 100; }
|
| 980 | 1161 |
.nav-bar { display: flex; justify-content: space-around; padding: 10px 0; }
|
| 981 | 1162 |
.nav-item { display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; color: var(--text-main); cursor: pointer; width: 80px; text-decoration: none; }
|
| 982 | 1163 |
.nav-item.active { color: var(--primary-color); }
|
| 983 | 1164 |
.nav-item svg { width: 24px; height: 24px; margin-bottom: 4px; fill: none; stroke: currentColor; stroke-width: 2; }
|
| 984 | 1165 |
`); |
| 985 |
-customElements.define("winzer-nav", X);
|
|
| 986 |
-class Q extends g {
|
|
| 1166 |
+customElements.define("winzer-nav", Q);
|
|
| 1167 |
+class ee extends m {
|
|
| 987 | 1168 |
render() {
|
| 988 | 1169 |
return c`<label class="switch"><input type="checkbox" ?checked="${this.checked}" @change="${(e) => this.checked = e.target.checked}"><span class="slider"></span></label>`;
|
| 989 | 1170 |
} |
| 990 | 1171 |
} |
| 991 |
-p(Q, "properties", { checked: { type: Boolean } }), p(Q, "styles", f`
|
|
| 1172 |
+d(ee, "properties", { checked: { type: Boolean } }), d(ee, "styles", f`
|
|
| 992 | 1173 |
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
|
| 993 | 1174 |
.switch input { opacity: 0; width: 0; height: 0; }
|
| 994 | 1175 |
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ddd; transition: .4s; border-radius: 24px; }
|
| ... | ... |
@@ -996,34 +1177,34 @@ p(Q, "properties", { checked: { type: Boolean } }), p(Q, "styles", f`
|
| 996 | 1177 |
input:checked + .slider { background-color: var(--primary-color); }
|
| 997 | 1178 |
input:checked + .slider:before { transform: translateX(20px); }
|
| 998 | 1179 |
`); |
| 999 |
-customElements.define("toggle-switch", Q);
|
|
| 1000 |
-class ee extends g {
|
|
| 1180 |
+customElements.define("toggle-switch", ee);
|
|
| 1181 |
+class te extends m {
|
|
| 1001 | 1182 |
constructor() {
|
| 1002 | 1183 |
super(), this.isUserModalOpen = !1, this.isFilterModalOpen = !1, this.currentTab = "news", this.appTitle = "WINZER-PORTAL", this.appSubtitle = "Badischer Winzerkeller", this.navItems = [ |
| 1003 | 1184 |
{
|
| 1004 | 1185 |
id: "news", |
| 1005 | 1186 |
label: "News", |
| 1006 | 1187 |
url: "/news", |
| 1007 |
- icon: w`<svg viewBox="0 0 24 24"><path d="M19 20H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2-2v1m2 13a2 2 0 0 1-2-2V7m2 13a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"/></svg>` |
|
| 1188 |
+ icon: $`<svg viewBox="0 0 24 24"><path d="M19 20H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2-2v1m2 13a2 2 0 0 1-2-2V7m2 13a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"/></svg>` |
|
| 1008 | 1189 |
}, |
| 1009 | 1190 |
{
|
| 1010 | 1191 |
id: "anlieferung", |
| 1011 | 1192 |
label: "Anlieferung", |
| 1012 | 1193 |
url: "/anlieferung", |
| 1013 |
- icon: w`<svg viewBox="0 0 24 24"><circle cx="12" cy="10" r="2"/><circle cx="15.5" cy="8" r="2"/><circle cx="8.5" cy="8" r="2"/><circle cx="12" cy="6" r="2"/><circle cx="10" cy="13" r="2"/><circle cx="14" cy="13" r="2"/><circle cx="12" cy="16" r="2"/><path d="M12 2v4" stroke-linecap="round"/></svg>` |
|
| 1194 |
+ icon: $`<svg viewBox="0 0 24 24"><circle cx="12" cy="10" r="2"/><circle cx="15.5" cy="8" r="2"/><circle cx="8.5" cy="8" r="2"/><circle cx="12" cy="6" r="2"/><circle cx="10" cy="13" r="2"/><circle cx="14" cy="13" r="2"/><circle cx="12" cy="16" r="2"/><path d="M12 2v4" stroke-linecap="round"/></svg>` |
|
| 1014 | 1195 |
}, |
| 1015 | 1196 |
{
|
| 1016 | 1197 |
id: "tresor", |
| 1017 | 1198 |
label: "Datei-Tresor", |
| 1018 | 1199 |
url: "/tresor", |
| 1019 |
- icon: w`<svg viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/><path d="M12 12v3"/><path d="M12 12v-1"/></svg>` |
|
| 1200 |
+ icon: $`<svg viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/><path d="M12 12v3"/><path d="M12 12v-1"/></svg>` |
|
| 1020 | 1201 |
} |
| 1021 | 1202 |
], this.menuAccount = [ |
| 1022 |
- { label: "Persönliche Daten", icon: w`<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`, action: "profile" },
|
|
| 1023 |
- { label: "Sicherheits-Einstellungen", icon: w`<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`, action: "security" },
|
|
| 1024 |
- { label: "Meine Buchungen", icon: w`<circle cx="12" cy="10" r="2"/><circle cx="15.5" cy="8" r="2"/><circle cx="8.5" cy="8" r="2"/><circle cx="12" cy="6" r="2"/><circle cx="10" cy="13" r="2"/><circle cx="14" cy="13" r="2"/><circle cx="12" cy="16" r="2"/><path d="M12 2v4"/>`, action: "bookings" }
|
|
| 1203 |
+ { label: "Persönliche Daten", icon: $`<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`, action: "profile" },
|
|
| 1204 |
+ { label: "Sicherheits-Einstellungen", icon: $`<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`, action: "security" },
|
|
| 1205 |
+ { label: "Meine Buchungen", icon: $`<circle cx="12" cy="10" r="2"/><circle cx="15.5" cy="8" r="2"/><circle cx="8.5" cy="8" r="2"/><circle cx="12" cy="6" r="2"/><circle cx="10" cy="13" r="2"/><circle cx="14" cy="13" r="2"/><circle cx="12" cy="16" r="2"/><path d="M12 2v4"/>`, action: "bookings" }
|
|
| 1025 | 1206 |
], this.menuSession = [ |
| 1026 |
- { label: "Abmelden", icon: w`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/>`, action: "logout" }
|
|
| 1207 |
+ { label: "Abmelden", icon: $`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/>`, action: "logout" }
|
|
| 1027 | 1208 |
]; |
| 1028 | 1209 |
} |
| 1029 | 1210 |
render() {
|
| ... | ... |
@@ -1099,7 +1280,7 @@ class ee extends g {
|
| 1099 | 1280 |
`; |
| 1100 | 1281 |
} |
| 1101 | 1282 |
} |
| 1102 |
-p(ee, "properties", {
|
|
| 1283 |
+d(te, "properties", {
|
|
| 1103 | 1284 |
isUserModalOpen: { type: Boolean },
|
| 1104 | 1285 |
isFilterModalOpen: { type: Boolean },
|
| 1105 | 1286 |
currentTab: { type: String },
|
| ... | ... |
@@ -1110,7 +1291,7 @@ p(ee, "properties", {
|
| 1110 | 1291 |
// [{ id, label, icon (svg string), url }]
|
| 1111 | 1292 |
menuAccount: { type: Array },
|
| 1112 | 1293 |
menuSession: { type: Array }
|
| 1113 |
-}), p(ee, "styles", f` |
|
| 1294 |
+}), d(te, "styles", f` |
|
| 1114 | 1295 |
:host {
|
| 1115 | 1296 |
display: block; |
| 1116 | 1297 |
background-color: var(--bg-white); |
| ... | ... |
@@ -1191,14 +1372,14 @@ p(ee, "properties", {
|
| 1191 | 1372 |
cursor: pointer; |
| 1192 | 1373 |
} |
| 1193 | 1374 |
`); |
| 1194 |
-customElements.define("winzer-app", ee);
|
|
| 1375 |
+customElements.define("winzer-app", te);
|
|
| 1195 | 1376 |
console.log("luumiCORE Core Bundle initialized");
|
| 1196 |
-class ke extends g {
|
|
| 1377 |
+class Ee extends m {
|
|
| 1197 | 1378 |
render() {
|
| 1198 | 1379 |
return c`<p>Hello from luumiCORE!</p>`; |
| 1199 | 1380 |
} |
| 1200 | 1381 |
} |
| 1201 |
-p(ke, "styles", f` |
|
| 1382 |
+d(Ee, "styles", f` |
|
| 1202 | 1383 |
:host {
|
| 1203 | 1384 |
display: block; |
| 1204 | 1385 |
padding: 16px; |
| ... | ... |
@@ -1206,7 +1387,7 @@ p(ke, "styles", f` |
| 1206 | 1387 |
border: 1px solid var(--luumicore-primary, blue); |
| 1207 | 1388 |
} |
| 1208 | 1389 |
`); |
| 1209 |
-customElements.define("luumicore-element", ke);
|
|
| 1390 |
+customElements.define("luumicore-element", Ee);
|
|
| 1210 | 1391 |
export {
|
| 1211 |
- ke as LuumicoreElement |
|
| 1392 |
+ Ee as LuumicoreElement |
|
| 1212 | 1393 |
}; |