reke-ui 0.2.0 → 0.2.1

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.
@@ -128,6 +128,139 @@
128
128
  }
129
129
  ]
130
130
  },
131
+ {
132
+ "kind": "javascript-module",
133
+ "path": "src/components/reke-badge/reke-badge.ts",
134
+ "declarations": [
135
+ {
136
+ "kind": "class",
137
+ "description": "",
138
+ "name": "RekeBadge",
139
+ "cssProperties": [
140
+ {
141
+ "description": "Default variant background color.",
142
+ "name": "--reke-color-surface",
143
+ "default": "#1A1A1A"
144
+ },
145
+ {
146
+ "description": "Default variant text color.",
147
+ "name": "--reke-color-text",
148
+ "default": "#E5E5E5"
149
+ },
150
+ {
151
+ "description": "Default variant border color.",
152
+ "name": "--reke-color-border",
153
+ "default": "#252525"
154
+ },
155
+ {
156
+ "description": "Primary/success variant accent color.",
157
+ "name": "--reke-color-primary",
158
+ "default": "#22C55E"
159
+ },
160
+ {
161
+ "description": "Danger variant accent color.",
162
+ "name": "--reke-color-danger",
163
+ "default": "#EF4444"
164
+ }
165
+ ],
166
+ "cssParts": [
167
+ {
168
+ "description": "The inner badge element.",
169
+ "name": "badge"
170
+ }
171
+ ],
172
+ "slots": [
173
+ {
174
+ "description": "Default slot for badge text.",
175
+ "name": ""
176
+ }
177
+ ],
178
+ "members": [
179
+ {
180
+ "kind": "field",
181
+ "name": "variant",
182
+ "type": {
183
+ "text": "BadgeVariant"
184
+ },
185
+ "default": "'default'",
186
+ "attribute": "variant",
187
+ "reflects": true
188
+ },
189
+ {
190
+ "kind": "field",
191
+ "name": "size",
192
+ "type": {
193
+ "text": "BadgeSize"
194
+ },
195
+ "default": "'md'",
196
+ "attribute": "size",
197
+ "reflects": true
198
+ },
199
+ {
200
+ "kind": "field",
201
+ "name": "shape",
202
+ "type": {
203
+ "text": "BadgeShape"
204
+ },
205
+ "default": "'pill'",
206
+ "attribute": "shape",
207
+ "reflects": true
208
+ }
209
+ ],
210
+ "attributes": [
211
+ {
212
+ "name": "variant",
213
+ "type": {
214
+ "text": "BadgeVariant"
215
+ },
216
+ "default": "'default'",
217
+ "fieldName": "variant"
218
+ },
219
+ {
220
+ "name": "size",
221
+ "type": {
222
+ "text": "BadgeSize"
223
+ },
224
+ "default": "'md'",
225
+ "fieldName": "size"
226
+ },
227
+ {
228
+ "name": "shape",
229
+ "type": {
230
+ "text": "BadgeShape"
231
+ },
232
+ "default": "'pill'",
233
+ "fieldName": "shape"
234
+ }
235
+ ],
236
+ "superclass": {
237
+ "name": "RekeElement",
238
+ "module": "/src/shared/base-element.js"
239
+ },
240
+ "tagName": "reke-badge",
241
+ "customElement": true,
242
+ "summary": "A badge component for displaying labels, statuses, and counts."
243
+ }
244
+ ],
245
+ "exports": [
246
+ {
247
+ "kind": "js",
248
+ "name": "RekeBadge",
249
+ "declaration": {
250
+ "name": "RekeBadge",
251
+ "module": "src/components/reke-badge/reke-badge.ts"
252
+ }
253
+ },
254
+ {
255
+ "kind": "custom-element-definition",
256
+ "name": "reke-badge",
257
+ "declaration": {
258
+ "name": "RekeBadge",
259
+ "module": "src/components/reke-badge/reke-badge.ts"
260
+ }
261
+ }
262
+ ]
263
+ },
131
264
  {
132
265
  "kind": "javascript-module",
133
266
  "path": "src/components/reke-button/reke-button.ts",
@@ -321,139 +454,6 @@
321
454
  }
322
455
  ]
323
456
  },
324
- {
325
- "kind": "javascript-module",
326
- "path": "src/components/reke-badge/reke-badge.ts",
327
- "declarations": [
328
- {
329
- "kind": "class",
330
- "description": "",
331
- "name": "RekeBadge",
332
- "cssProperties": [
333
- {
334
- "description": "Default variant background color.",
335
- "name": "--reke-color-surface",
336
- "default": "#1A1A1A"
337
- },
338
- {
339
- "description": "Default variant text color.",
340
- "name": "--reke-color-text",
341
- "default": "#E5E5E5"
342
- },
343
- {
344
- "description": "Default variant border color.",
345
- "name": "--reke-color-border",
346
- "default": "#252525"
347
- },
348
- {
349
- "description": "Primary/success variant accent color.",
350
- "name": "--reke-color-primary",
351
- "default": "#22C55E"
352
- },
353
- {
354
- "description": "Danger variant accent color.",
355
- "name": "--reke-color-danger",
356
- "default": "#EF4444"
357
- }
358
- ],
359
- "cssParts": [
360
- {
361
- "description": "The inner badge element.",
362
- "name": "badge"
363
- }
364
- ],
365
- "slots": [
366
- {
367
- "description": "Default slot for badge text.",
368
- "name": ""
369
- }
370
- ],
371
- "members": [
372
- {
373
- "kind": "field",
374
- "name": "variant",
375
- "type": {
376
- "text": "BadgeVariant"
377
- },
378
- "default": "'default'",
379
- "attribute": "variant",
380
- "reflects": true
381
- },
382
- {
383
- "kind": "field",
384
- "name": "size",
385
- "type": {
386
- "text": "BadgeSize"
387
- },
388
- "default": "'md'",
389
- "attribute": "size",
390
- "reflects": true
391
- },
392
- {
393
- "kind": "field",
394
- "name": "shape",
395
- "type": {
396
- "text": "BadgeShape"
397
- },
398
- "default": "'pill'",
399
- "attribute": "shape",
400
- "reflects": true
401
- }
402
- ],
403
- "attributes": [
404
- {
405
- "name": "variant",
406
- "type": {
407
- "text": "BadgeVariant"
408
- },
409
- "default": "'default'",
410
- "fieldName": "variant"
411
- },
412
- {
413
- "name": "size",
414
- "type": {
415
- "text": "BadgeSize"
416
- },
417
- "default": "'md'",
418
- "fieldName": "size"
419
- },
420
- {
421
- "name": "shape",
422
- "type": {
423
- "text": "BadgeShape"
424
- },
425
- "default": "'pill'",
426
- "fieldName": "shape"
427
- }
428
- ],
429
- "superclass": {
430
- "name": "RekeElement",
431
- "module": "/src/shared/base-element.js"
432
- },
433
- "tagName": "reke-badge",
434
- "customElement": true,
435
- "summary": "A badge component for displaying labels, statuses, and counts."
436
- }
437
- ],
438
- "exports": [
439
- {
440
- "kind": "js",
441
- "name": "RekeBadge",
442
- "declaration": {
443
- "name": "RekeBadge",
444
- "module": "src/components/reke-badge/reke-badge.ts"
445
- }
446
- },
447
- {
448
- "kind": "custom-element-definition",
449
- "name": "reke-badge",
450
- "declaration": {
451
- "name": "RekeBadge",
452
- "module": "src/components/reke-badge/reke-badge.ts"
453
- }
454
- }
455
- ]
456
- },
457
457
  {
458
458
  "kind": "javascript-module",
459
459
  "path": "src/components/reke-card/reke-card.ts",
@@ -1,11 +1,10 @@
1
1
  import { RekeElement as e } from "../../shared/base-element.js";
2
2
  import { __decorate as t } from "../../_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js";
3
- import { n } from "../../node_modules/lit-html/directives/ref.js";
4
- import "../../node_modules/lit/directives/ref.js";
5
- import { styles as r } from "./reke-table.styles.js";
6
- import { html as i, nothing as a } from "lit";
7
- import { customElement as o, property as s, state as c } from "lit/decorators.js";
8
- import { classMap as l } from "lit/directives/class-map.js";
3
+ import { styles as n } from "./reke-table.styles.js";
4
+ import { html as r, nothing as i } from "lit";
5
+ import { customElement as a, property as o, state as s } from "lit/decorators.js";
6
+ import { classMap as c } from "lit/directives/class-map.js";
7
+ import { ref as l } from "lit/directives/ref.js";
9
8
  //#region src/components/reke-table/reke-table.ts
10
9
  function u() {
11
10
  try {
@@ -30,7 +29,7 @@ var d = class extends e {
30
29
  super(...e), this.columns = [], this.rows = [], this.striped = !1, this.dense = !1, this.hoverable = !1, this.bordered = !1, this.borderless = !1, this.expandable = !1, this.expandOnRowClick = !1, this.sortKey = "", this.sortDirection = "asc", this.expandedRowElement = null, this.expandedRows = /* @__PURE__ */ new Set(), this._hostCache = /* @__PURE__ */ new Map(), this._cleanupMap = /* @__PURE__ */ new Map(), this._warnedDupKeys = /* @__PURE__ */ new Set(), this._warnedNumericTarget = !1, this._mountedKeys = /* @__PURE__ */ new Set(), this._keyToRow = /* @__PURE__ */ new Map(), this._refCallbacks = /* @__PURE__ */ new Map(), this._hasToolbar = !1, this._hasFooter = !1, this._warnedLegacyApi = !1;
31
30
  }
32
31
  static {
33
- this.styles = r;
32
+ this.styles = n;
34
33
  }
35
34
  _resolveKey(e, t) {
36
35
  return this.getRowKey ? this.getRowKey(e, t) : String(t);
@@ -90,15 +89,15 @@ var d = class extends e {
90
89
  r.parentElement !== n && n.appendChild(r);
91
90
  }, this._refCallbacks.set(e, t)), t;
92
91
  }
93
- _renderRow(e, t, r) {
94
- let o = this.expandedRows.has(r), s = `reke-table-expand-${String(r)}`, c = this.columns.length + +!!this.expandable;
95
- return i`
92
+ _renderRow(e, t, n) {
93
+ let a = this.expandedRows.has(n), o = `reke-table-expand-${String(n)}`, s = this.columns.length + +!!this.expandable;
94
+ return r`
96
95
  <tr
97
96
  part="row"
98
- class="row ${t % 2 == 1 ? "row--even" : ""} ${o ? "row--expanded" : ""}"
97
+ class="row ${t % 2 == 1 ? "row--even" : ""} ${a ? "row--expanded" : ""}"
99
98
  @click=${() => this.handleRowClick(e, t)}
100
99
  >
101
- ${this.expandable ? i`
100
+ ${this.expandable ? r`
102
101
  <td
103
102
  part="expand-toggle-cell"
104
103
  class="expand-toggle-cell"
@@ -106,18 +105,18 @@ var d = class extends e {
106
105
  <button
107
106
  type="button"
108
107
  part="expand-toggle-button"
109
- class="expand-toggle-button ${o ? "expand-toggle-button--expanded" : ""}"
110
- aria-expanded=${o ? "true" : "false"}
111
- aria-controls=${s}
112
- aria-label=${o ? "Collapse row" : "Expand row"}
113
- @click=${(e) => this._handleChevronClick(e, r)}
114
- @keydown=${(e) => this._handleChevronKeydown(e, r)}
108
+ class="expand-toggle-button ${a ? "expand-toggle-button--expanded" : ""}"
109
+ aria-expanded=${a ? "true" : "false"}
110
+ aria-controls=${o}
111
+ aria-label=${a ? "Collapse row" : "Expand row"}
112
+ @click=${(e) => this._handleChevronClick(e, n)}
113
+ @keydown=${(e) => this._handleChevronKeydown(e, n)}
115
114
  >
116
115
  <span class="expand-toggle-chevron" aria-hidden="true">▶</span>
117
116
  </button>
118
117
  </td>
119
- ` : a}
120
- ${this.columns.map((n) => i`
118
+ ` : i}
119
+ ${this.columns.map((n) => r`
121
120
  <td
122
121
  part="cell"
123
122
  class="cell"
@@ -127,17 +126,17 @@ var d = class extends e {
127
126
  </td>
128
127
  `)}
129
128
  </tr>
130
- ${this.expandedRowElement && o && this._keyToRow.get(r) === e ? i`
129
+ ${this.expandedRowElement && a && this._keyToRow.get(n) === e ? r`
131
130
  <tr part="expand-row" class="expand-row">
132
131
  <td
133
132
  part="expand-content"
134
133
  class="expand-content"
135
- id=${s}
136
- colspan=${c}
137
- ${n(this._expandTdRef(r))}
134
+ id=${o}
135
+ colspan=${s}
136
+ ${l(this._expandTdRef(n))}
138
137
  ></td>
139
138
  </tr>
140
- ` : a}
139
+ ` : i}
141
140
  `;
142
141
  }
143
142
  willUpdate(e) {
@@ -195,26 +194,26 @@ var d = class extends e {
195
194
  "table--hoverable": this.hoverable,
196
195
  "table--bordered": this.bordered
197
196
  };
198
- return i`
197
+ return r`
199
198
  <div class="table-container">
200
- ${this._hasToolbar ? i`
199
+ ${this._hasToolbar ? r`
201
200
  <div part="toolbar" class="table-toolbar">
202
201
  <slot name="toolbar" @slotchange=${this._onToolbarSlotChange}></slot>
203
202
  </div>
204
- ` : i`<slot name="toolbar" @slotchange=${this._onToolbarSlotChange} style="display:none"></slot>`}
203
+ ` : r`<slot name="toolbar" @slotchange=${this._onToolbarSlotChange} style="display:none"></slot>`}
205
204
 
206
205
  <div class="table-wrapper">
207
- <table part="table" class=${l(e)} role="table">
206
+ <table part="table" class=${c(e)} role="table">
208
207
  <thead part="header">
209
208
  <tr>
210
- ${this.expandable ? i`
209
+ ${this.expandable ? r`
211
210
  <th
212
211
  part="expand-toggle-header-cell"
213
212
  class="expand-toggle-header-cell"
214
213
  aria-hidden="true"
215
214
  ></th>
216
- ` : a}
217
- ${this.columns.map((e) => i`
215
+ ` : i}
216
+ ${this.columns.map((e) => r`
218
217
  <th
219
218
  part="header-cell"
220
219
  class="header-cell ${this.sortKey === e.key ? "header-cell--sorted" : ""} ${e.sortable === !1 ? "header-cell--no-sort" : ""}"
@@ -224,7 +223,7 @@ var d = class extends e {
224
223
  >
225
224
  <span class="header-content">
226
225
  ${e.header}
227
- ${this.sortKey === e.key ? i`<span class="sort-indicator" aria-hidden="true">${this.sortDirection === "asc" ? "↑" : "↓"}</span>` : a}
226
+ ${this.sortKey === e.key ? r`<span class="sort-indicator" aria-hidden="true">${this.sortDirection === "asc" ? "↑" : "↓"}</span>` : i}
228
227
  </span>
229
228
  </th>
230
229
  `)}
@@ -235,7 +234,7 @@ var d = class extends e {
235
234
  let n = this._resolveKey(e, t);
236
235
  return this._renderRow(e, t, n);
237
236
  })}
238
- ${this.rows.length === 0 ? i`
237
+ ${this.rows.length === 0 ? r`
239
238
  <tr class="row row--empty">
240
239
  <td
241
240
  class="cell cell--empty"
@@ -244,48 +243,48 @@ var d = class extends e {
244
243
  <slot name="empty">No data</slot>
245
244
  </td>
246
245
  </tr>
247
- ` : a}
246
+ ` : i}
248
247
  </tbody>
249
248
  </table>
250
249
  </div>
251
250
 
252
- ${this._hasFooter ? i`
251
+ ${this._hasFooter ? r`
253
252
  <div part="footer" class="table-footer">
254
253
  <slot name="footer" @slotchange=${this._onFooterSlotChange}></slot>
255
254
  </div>
256
- ` : i`<slot name="footer" @slotchange=${this._onFooterSlotChange} style="display:none"></slot>`}
255
+ ` : r`<slot name="footer" @slotchange=${this._onFooterSlotChange} style="display:none"></slot>`}
257
256
  </div>
258
257
  `;
259
258
  }
260
259
  };
261
- t([s({ attribute: !1 })], d.prototype, "columns", void 0), t([s({ attribute: !1 })], d.prototype, "rows", void 0), t([s({
260
+ t([o({ attribute: !1 })], d.prototype, "columns", void 0), t([o({ attribute: !1 })], d.prototype, "rows", void 0), t([o({
262
261
  type: Boolean,
263
262
  reflect: !0
264
- })], d.prototype, "striped", void 0), t([s({
263
+ })], d.prototype, "striped", void 0), t([o({
265
264
  type: Boolean,
266
265
  reflect: !0
267
- })], d.prototype, "dense", void 0), t([s({
266
+ })], d.prototype, "dense", void 0), t([o({
268
267
  type: Boolean,
269
268
  reflect: !0
270
- })], d.prototype, "hoverable", void 0), t([s({
269
+ })], d.prototype, "hoverable", void 0), t([o({
271
270
  type: Boolean,
272
271
  reflect: !0
273
- })], d.prototype, "bordered", void 0), t([s({
272
+ })], d.prototype, "bordered", void 0), t([o({
274
273
  type: Boolean,
275
274
  reflect: !0
276
- })], d.prototype, "borderless", void 0), t([s({
275
+ })], d.prototype, "borderless", void 0), t([o({
277
276
  type: Boolean,
278
277
  reflect: !0
279
- })], d.prototype, "expandable", void 0), t([s({
278
+ })], d.prototype, "expandable", void 0), t([o({
280
279
  type: Boolean,
281
280
  reflect: !0,
282
281
  attribute: "expand-on-row-click"
283
- })], d.prototype, "expandOnRowClick", void 0), t([s({
282
+ })], d.prototype, "expandOnRowClick", void 0), t([o({
284
283
  reflect: !0,
285
284
  attribute: "sort-key"
286
- })], d.prototype, "sortKey", void 0), t([s({
285
+ })], d.prototype, "sortKey", void 0), t([o({
287
286
  reflect: !0,
288
287
  attribute: "sort-direction"
289
- })], d.prototype, "sortDirection", void 0), t([s({ attribute: !1 })], d.prototype, "expandedRowElement", void 0), t([s({ attribute: !1 })], d.prototype, "getRowKey", void 0), t([s({ attribute: !1 })], d.prototype, "expandedRows", void 0), t([c()], d.prototype, "_hasToolbar", void 0), t([c()], d.prototype, "_hasFooter", void 0), d = t([o("reke-table")], d);
288
+ })], d.prototype, "sortDirection", void 0), t([o({ attribute: !1 })], d.prototype, "expandedRowElement", void 0), t([o({ attribute: !1 })], d.prototype, "getRowKey", void 0), t([o({ attribute: !1 })], d.prototype, "expandedRows", void 0), t([s()], d.prototype, "_hasToolbar", void 0), t([s()], d.prototype, "_hasFooter", void 0), d = t([a("reke-table")], d);
290
289
  //#endregion
291
290
  export { d as RekeTable };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reke-ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Web Component library built with Lit 3 — dark & light themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1 +0,0 @@
1
- import "../../lit-html/directives/ref.js";
@@ -1,55 +0,0 @@
1
- import { r as e } from "./directive-helpers.js";
2
- import { i as t, t as n } from "./directive.js";
3
- //#region node_modules/lit-html/async-directive.js
4
- var r = (e, t) => {
5
- let n = e._$AN;
6
- if (n === void 0) return !1;
7
- for (let e of n) e._$AO?.(t, !1), r(e, t);
8
- return !0;
9
- }, i = (e) => {
10
- let t, n;
11
- do {
12
- if ((t = e._$AM) === void 0) break;
13
- n = t._$AN, n.delete(e), e = t;
14
- } while (n?.size === 0);
15
- }, a = (e) => {
16
- for (let t; t = e._$AM; e = t) {
17
- let n = t._$AN;
18
- if (n === void 0) t._$AN = n = /* @__PURE__ */ new Set();
19
- else if (n.has(e)) break;
20
- n.add(e), c(t);
21
- }
22
- };
23
- function o(e) {
24
- this._$AN === void 0 ? this._$AM = e : (i(this), this._$AM = e, a(this));
25
- }
26
- function s(e, t = !1, n = 0) {
27
- let a = this._$AH, o = this._$AN;
28
- if (o !== void 0 && o.size !== 0) if (t) if (Array.isArray(a)) for (let e = n; e < a.length; e++) r(a[e], !1), i(a[e]);
29
- else a != null && (r(a, !1), i(a));
30
- else r(this, e);
31
- }
32
- var c = (e) => {
33
- e.type == n.CHILD && (e._$AP ??= s, e._$AQ ??= o);
34
- }, l = class extends t {
35
- constructor() {
36
- super(...arguments), this._$AN = void 0;
37
- }
38
- _$AT(e, t, n) {
39
- super._$AT(e, t, n), a(this), this.isConnected = e._$AU;
40
- }
41
- _$AO(e, t = !0) {
42
- e !== this.isConnected && (this.isConnected = e, e ? this.reconnected?.() : this.disconnected?.()), t && (r(this, e), i(this));
43
- }
44
- setValue(t) {
45
- if (e(this._$Ct)) this._$Ct._$AI(t, this);
46
- else {
47
- let e = [...this._$Ct._$AH];
48
- e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
49
- }
50
- }
51
- disconnected() {}
52
- reconnected() {}
53
- };
54
- //#endregion
55
- export { l as f };
@@ -1,5 +0,0 @@
1
- import { j as e } from "./lit-html.js";
2
- //#region node_modules/lit-html/directive-helpers.js
3
- var { I: t } = e, n = (e) => e.strings === void 0;
4
- //#endregion
5
- export { n as r };
@@ -1,28 +0,0 @@
1
- //#region node_modules/lit-html/directive.js
2
- var e = {
3
- ATTRIBUTE: 1,
4
- CHILD: 2,
5
- PROPERTY: 3,
6
- BOOLEAN_ATTRIBUTE: 4,
7
- EVENT: 5,
8
- ELEMENT: 6
9
- }, t = (e) => (...t) => ({
10
- _$litDirective$: e,
11
- values: t
12
- }), n = class {
13
- constructor(e) {}
14
- get _$AU() {
15
- return this._$AM._$AU;
16
- }
17
- _$AT(e, t, n) {
18
- this._$Ct = e, this._$AM = t, this._$Ci = n;
19
- }
20
- _$AS(e, t) {
21
- return this.update(e, t);
22
- }
23
- update(e, t) {
24
- return this.render(...t);
25
- }
26
- };
27
- //#endregion
28
- export { t as e, n as i, e as t };
@@ -1,30 +0,0 @@
1
- import { A as e } from "../lit-html.js";
2
- import { e as t } from "../directive.js";
3
- import { f as n } from "../async-directive.js";
4
- //#region node_modules/lit-html/directives/ref.js
5
- var r = /* @__PURE__ */ new WeakMap(), i = t(class extends n {
6
- render(t) {
7
- return e;
8
- }
9
- update(t, [n]) {
10
- let r = n !== this.G;
11
- return r && this.rt(void 0), (r || this.lt !== this.ct) && (this.G = n, this.ht = t.options?.host, this.rt(this.ct = t.element)), e;
12
- }
13
- rt(e) {
14
- if (this.G !== void 0) if (this.isConnected || (e = void 0), typeof this.G == "function") {
15
- let t = this.ht ?? globalThis, n = r.get(t);
16
- n === void 0 && (n = /* @__PURE__ */ new WeakMap(), r.set(t, n)), n.get(this.G) !== void 0 && this.G.call(this.ht, void 0), n.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
17
- } else this.G.value = e;
18
- }
19
- get lt() {
20
- return typeof this.G == "function" ? r.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
21
- }
22
- disconnected() {
23
- this.lt === this.ct && this.rt(void 0);
24
- }
25
- reconnected() {
26
- this.rt(this.ct);
27
- }
28
- });
29
- //#endregion
30
- export { i as n };
@@ -1,234 +0,0 @@
1
- //#region node_modules/lit-html/lit-html.js
2
- var e = globalThis, t = (e) => e, n = e.trustedTypes, r = n ? n.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, i = "$lit$", a = `lit$${Math.random().toFixed(9).slice(2)}$`, o = "?" + a, s = `<${o}>`, c = document, l = () => c.createComment(""), u = (e) => e === null || typeof e != "object" && typeof e != "function", d = Array.isArray, f = (e) => d(e) || typeof e?.[Symbol.iterator] == "function", p = "[ \n\f\r]", m = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, h = /-->/g, g = />/g, _ = RegExp(`>|${p}(?:([^\\s"'>=/]+)(${p}*=${p}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), v = /'/g, y = /"/g, b = /^(?:script|style|textarea|title)$/i, x = Symbol.for("lit-noChange"), S = Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), w = c.createTreeWalker(c, 129);
3
- function T(e, t) {
4
- if (!d(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
5
- return r === void 0 ? t : r.createHTML(t);
6
- }
7
- var E = (e, t) => {
8
- let n = e.length - 1, r = [], o, c = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", l = m;
9
- for (let t = 0; t < n; t++) {
10
- let n = e[t], u, d, f = -1, p = 0;
11
- for (; p < n.length && (l.lastIndex = p, d = l.exec(n), d !== null);) p = l.lastIndex, l === m ? d[1] === "!--" ? l = h : d[1] === void 0 ? d[2] === void 0 ? d[3] !== void 0 && (l = _) : (b.test(d[2]) && (o = RegExp("</" + d[2], "g")), l = _) : l = g : l === _ ? d[0] === ">" ? (l = o ?? m, f = -1) : d[1] === void 0 ? f = -2 : (f = l.lastIndex - d[2].length, u = d[1], l = d[3] === void 0 ? _ : d[3] === "\"" ? y : v) : l === y || l === v ? l = _ : l === h || l === g ? l = m : (l = _, o = void 0);
12
- let x = l === _ && e[t + 1].startsWith("/>") ? " " : "";
13
- c += l === m ? n + s : f >= 0 ? (r.push(u), n.slice(0, f) + i + n.slice(f) + a + x) : n + a + (f === -2 ? t : x);
14
- }
15
- return [T(e, c + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
16
- }, D = class e {
17
- constructor({ strings: t, _$litType$: r }, s) {
18
- let c;
19
- this.parts = [];
20
- let u = 0, d = 0, f = t.length - 1, p = this.parts, [m, h] = E(t, r);
21
- if (this.el = e.createElement(m, s), w.currentNode = this.el.content, r === 2 || r === 3) {
22
- let e = this.el.content.firstChild;
23
- e.replaceWith(...e.childNodes);
24
- }
25
- for (; (c = w.nextNode()) !== null && p.length < f;) {
26
- if (c.nodeType === 1) {
27
- if (c.hasAttributes()) for (let e of c.getAttributeNames()) if (e.endsWith(i)) {
28
- let t = h[d++], n = c.getAttribute(e).split(a), r = /([.?@])?(.*)/.exec(t);
29
- p.push({
30
- type: 1,
31
- index: u,
32
- name: r[2],
33
- strings: n,
34
- ctor: r[1] === "." ? M : r[1] === "?" ? N : r[1] === "@" ? P : j
35
- }), c.removeAttribute(e);
36
- } else e.startsWith(a) && (p.push({
37
- type: 6,
38
- index: u
39
- }), c.removeAttribute(e));
40
- if (b.test(c.tagName)) {
41
- let e = c.textContent.split(a), t = e.length - 1;
42
- if (t > 0) {
43
- c.textContent = n ? n.emptyScript : "";
44
- for (let n = 0; n < t; n++) c.append(e[n], l()), w.nextNode(), p.push({
45
- type: 2,
46
- index: ++u
47
- });
48
- c.append(e[t], l());
49
- }
50
- }
51
- } else if (c.nodeType === 8) if (c.data === o) p.push({
52
- type: 2,
53
- index: u
54
- });
55
- else {
56
- let e = -1;
57
- for (; (e = c.data.indexOf(a, e + 1)) !== -1;) p.push({
58
- type: 7,
59
- index: u
60
- }), e += a.length - 1;
61
- }
62
- u++;
63
- }
64
- }
65
- static createElement(e, t) {
66
- let n = c.createElement("template");
67
- return n.innerHTML = e, n;
68
- }
69
- };
70
- function O(e, t, n = e, r) {
71
- if (t === x) return t;
72
- let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = u(t) ? void 0 : t._$litDirective$;
73
- return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = O(e, i._$AS(e, t.values), i, r)), t;
74
- }
75
- var k = class {
76
- constructor(e, t) {
77
- this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
78
- }
79
- get parentNode() {
80
- return this._$AM.parentNode;
81
- }
82
- get _$AU() {
83
- return this._$AM._$AU;
84
- }
85
- u(e) {
86
- let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? c).importNode(t, !0);
87
- w.currentNode = r;
88
- let i = w.nextNode(), a = 0, o = 0, s = n[0];
89
- for (; s !== void 0;) {
90
- if (a === s.index) {
91
- let t;
92
- s.type === 2 ? t = new A(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new F(i, this, e)), this._$AV.push(t), s = n[++o];
93
- }
94
- a !== s?.index && (i = w.nextNode(), a++);
95
- }
96
- return w.currentNode = c, r;
97
- }
98
- p(e) {
99
- let t = 0;
100
- for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
101
- }
102
- }, A = class e {
103
- get _$AU() {
104
- return this._$AM?._$AU ?? this._$Cv;
105
- }
106
- constructor(e, t, n, r) {
107
- this.type = 2, this._$AH = S, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
108
- }
109
- get parentNode() {
110
- let e = this._$AA.parentNode, t = this._$AM;
111
- return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
112
- }
113
- get startNode() {
114
- return this._$AA;
115
- }
116
- get endNode() {
117
- return this._$AB;
118
- }
119
- _$AI(e, t = this) {
120
- e = O(this, e, t), u(e) ? e === S || e == null || e === "" ? (this._$AH !== S && this._$AR(), this._$AH = S) : e !== this._$AH && e !== x && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? f(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
121
- }
122
- O(e) {
123
- return this._$AA.parentNode.insertBefore(e, this._$AB);
124
- }
125
- T(e) {
126
- this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
127
- }
128
- _(e) {
129
- this._$AH !== S && u(this._$AH) ? this._$AA.nextSibling.data = e : this.T(c.createTextNode(e)), this._$AH = e;
130
- }
131
- $(e) {
132
- let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = D.createElement(T(n.h, n.h[0]), this.options)), n);
133
- if (this._$AH?._$AD === r) this._$AH.p(t);
134
- else {
135
- let e = new k(r, this), n = e.u(this.options);
136
- e.p(t), this.T(n), this._$AH = e;
137
- }
138
- }
139
- _$AC(e) {
140
- let t = C.get(e.strings);
141
- return t === void 0 && C.set(e.strings, t = new D(e)), t;
142
- }
143
- k(t) {
144
- d(this._$AH) || (this._$AH = [], this._$AR());
145
- let n = this._$AH, r, i = 0;
146
- for (let a of t) i === n.length ? n.push(r = new e(this.O(l()), this.O(l()), this, this.options)) : r = n[i], r._$AI(a), i++;
147
- i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
148
- }
149
- _$AR(e = this._$AA.nextSibling, n) {
150
- for (this._$AP?.(!1, !0, n); e !== this._$AB;) {
151
- let n = t(e).nextSibling;
152
- t(e).remove(), e = n;
153
- }
154
- }
155
- setConnected(e) {
156
- this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
157
- }
158
- }, j = class {
159
- get tagName() {
160
- return this.element.tagName;
161
- }
162
- get _$AU() {
163
- return this._$AM._$AU;
164
- }
165
- constructor(e, t, n, r, i) {
166
- this.type = 1, this._$AH = S, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = S;
167
- }
168
- _$AI(e, t = this, n, r) {
169
- let i = this.strings, a = !1;
170
- if (i === void 0) e = O(this, e, t, 0), a = !u(e) || e !== this._$AH && e !== x, a && (this._$AH = e);
171
- else {
172
- let r = e, o, s;
173
- for (e = i[0], o = 0; o < i.length - 1; o++) s = O(this, r[n + o], t, o), s === x && (s = this._$AH[o]), a ||= !u(s) || s !== this._$AH[o], s === S ? e = S : e !== S && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
174
- }
175
- a && !r && this.j(e);
176
- }
177
- j(e) {
178
- e === S ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
179
- }
180
- }, M = class extends j {
181
- constructor() {
182
- super(...arguments), this.type = 3;
183
- }
184
- j(e) {
185
- this.element[this.name] = e === S ? void 0 : e;
186
- }
187
- }, N = class extends j {
188
- constructor() {
189
- super(...arguments), this.type = 4;
190
- }
191
- j(e) {
192
- this.element.toggleAttribute(this.name, !!e && e !== S);
193
- }
194
- }, P = class extends j {
195
- constructor(e, t, n, r, i) {
196
- super(e, t, n, r, i), this.type = 5;
197
- }
198
- _$AI(e, t = this) {
199
- if ((e = O(this, e, t, 0) ?? S) === x) return;
200
- let n = this._$AH, r = e === S && n !== S || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== S && (n === S || r);
201
- r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
202
- }
203
- handleEvent(e) {
204
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
205
- }
206
- }, F = class {
207
- constructor(e, t, n) {
208
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
209
- }
210
- get _$AU() {
211
- return this._$AM._$AU;
212
- }
213
- _$AI(e) {
214
- O(this, e);
215
- }
216
- }, I = {
217
- M: i,
218
- P: a,
219
- A: o,
220
- C: 1,
221
- L: E,
222
- R: k,
223
- D: f,
224
- V: O,
225
- I: A,
226
- H: j,
227
- N,
228
- U: P,
229
- B: M,
230
- F
231
- }, L = e.litHtmlPolyfillSupport;
232
- L?.(D, A), (e.litHtmlVersions ??= []).push("3.3.3");
233
- //#endregion
234
- export { S as A, I as j };