reke-ui 0.4.0 → 0.4.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.
@@ -4,9 +4,11 @@ import { styles as n } from "./reke-table.styles.js";
4
4
  import { html as r, nothing as i } from "lit";
5
5
  import { customElement as a, property as o, state as s } from "lit/decorators.js";
6
6
  import { classMap as c } from "lit/directives/class-map.js";
7
- import { ref as l } from "lit/directives/ref.js";
7
+ import { guard as l } from "lit/directives/guard.js";
8
+ import { ref as u } from "lit/directives/ref.js";
8
9
  //#region src/components/reke-table/reke-table.ts
9
- function u() {
10
+ var d = 400, f = 20;
11
+ function p() {
10
12
  try {
11
13
  let e = {
12
14
  BASE_URL: "/",
@@ -24,9 +26,20 @@ function u() {
24
26
  } catch {}
25
27
  return !1;
26
28
  }
27
- var d = class extends e {
29
+ var m = class extends e {
28
30
  constructor(...e) {
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._collapsingKeys = /* @__PURE__ */ new Set(), this._enteringKeys = /* @__PURE__ */ new Set(), this._collapseEndHandlers = /* @__PURE__ */ new Map(), this._keyToRow = /* @__PURE__ */ new Map(), this._refCallbacks = /* @__PURE__ */ new Map(), this._hasToolbar = !1, this._hasFooter = !1, this._warnedLegacyApi = !1;
31
+ 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.virtualized = !1, this.rowHeight = 0, this.maxHeight = "", this.overscan = 4, 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._collapsingKeys = /* @__PURE__ */ new Set(), this._enteringKeys = /* @__PURE__ */ new Set(), this._collapseTokens = /* @__PURE__ */ new Map(), this._collapseSeq = 0, this._keyToRow = /* @__PURE__ */ new Map(), this._keyToIndex = /* @__PURE__ */ new Map(), this._expandedHeights = /* @__PURE__ */ new Map(), this._expandRowElements = /* @__PURE__ */ new Map(), this._expandRowKeys = /* @__PURE__ */ new WeakMap(), this._expandRowRefs = /* @__PURE__ */ new Map(), this._expandObserver = null, this._windowStart = 0, this._windowEnd = 0, this._previousWindowStart = 0, this._previousWindowEnd = 0, this._focusInsideRows = !1, this._focusedRowIndex = null, this._onRowsFocusIn = (e) => {
32
+ this._focusInsideRows = !0, this._focusedRowIndex = this._rowIndexOf(e.target);
33
+ }, this._refCallbacks = /* @__PURE__ */ new Map(), this._hasToolbar = !1, this._hasFooter = !1, this._scrollTop = 0, this._viewportHeight = 0, this._scrollContainer = null, this._viewportObserver = null, this._scrollFrame = null, this._onScroll = () => {
34
+ this._scrollFrame === null && (this._scrollFrame = requestAnimationFrame(() => {
35
+ this._scrollFrame = null, this._scrollContainer && (this._scrollTop = this._scrollContainer.scrollTop);
36
+ }));
37
+ }, this._bindScrollContainer = (e) => {
38
+ let t = e ?? null;
39
+ t !== this._scrollContainer && (this._scrollContainer?.removeEventListener("scroll", this._onScroll), this._viewportObserver?.disconnect(), this._viewportObserver = null, this._scrollContainer = t, t && (t.addEventListener("scroll", this._onScroll, { passive: !0 }), this._viewportObserver = new ResizeObserver(() => {
40
+ this._scrollContainer && (this._viewportHeight = this._scrollContainer.clientHeight);
41
+ }), this._viewportObserver.observe(t)));
42
+ }, this._warnedLegacyApi = !1, this._warnedVirtualConfig = !1;
30
43
  }
31
44
  static {
32
45
  this.shadowRootOptions = {
@@ -37,6 +50,120 @@ var d = class extends e {
37
50
  static {
38
51
  this.styles = n;
39
52
  }
53
+ _rowIndexOf(e) {
54
+ let t = e?.closest?.("tr[aria-rowindex]") ?? null;
55
+ if (!t) return null;
56
+ let n = Number(t.getAttribute("aria-rowindex"));
57
+ return Number.isFinite(n) ? n : null;
58
+ }
59
+ _clearRowFocusTracking() {
60
+ this._focusInsideRows = !1, this._focusedRowIndex = null;
61
+ }
62
+ _extraHeights() {
63
+ if (this._expandedHeights.size === 0) return [];
64
+ let e = [];
65
+ for (let [t, n] of this._expandedHeights) {
66
+ let r = this._keyToIndex.get(t);
67
+ r === void 0 || n <= 0 || e.push({
68
+ index: r,
69
+ extra: n
70
+ });
71
+ }
72
+ return e.sort((e, t) => e.index - t.index);
73
+ }
74
+ _offsetOf(e, t) {
75
+ let n = 0;
76
+ for (let r of t) {
77
+ if (r.index >= e) break;
78
+ n += r.extra;
79
+ }
80
+ return e * this.rowHeight + n;
81
+ }
82
+ _indexAtOffset(e, t, n) {
83
+ let r = 0;
84
+ for (let n of t) {
85
+ if ((n.index + 1) * this.rowHeight + r + n.extra > e) break;
86
+ r += n.extra;
87
+ }
88
+ let i = Math.floor((e - r) / this.rowHeight);
89
+ return Math.min(n, Math.max(0, i));
90
+ }
91
+ _computeWindow() {
92
+ let e = this.rows.length;
93
+ if (!this.virtualized || this.rowHeight <= 0) return {
94
+ start: 0,
95
+ end: e,
96
+ topSpacer: 0,
97
+ bottomSpacer: 0
98
+ };
99
+ let t = this._extraHeights(), n = 0;
100
+ for (let e of t) n += e.extra;
101
+ let r = e * this.rowHeight + n;
102
+ if (this._viewportHeight <= 0) {
103
+ let n = Math.min(e, this.overscan * 2 + f);
104
+ return {
105
+ start: 0,
106
+ end: n,
107
+ topSpacer: 0,
108
+ bottomSpacer: Math.max(0, r - this._offsetOf(n, t))
109
+ };
110
+ }
111
+ let i = Math.max(0, this._indexAtOffset(this._scrollTop, t, e) - this.overscan), a = this._indexAtOffset(this._scrollTop + this._viewportHeight, t, e), o = Math.min(e, a + 1 + this.overscan);
112
+ return {
113
+ start: i,
114
+ end: o,
115
+ topSpacer: this._offsetOf(i, t),
116
+ bottomSpacer: Math.max(0, r - this._offsetOf(o, t))
117
+ };
118
+ }
119
+ _expandRowRef(e) {
120
+ let t = this._expandRowRefs.get(e);
121
+ return t || (t = (t) => {
122
+ let n = this._expandRowElements.get(e);
123
+ n && n !== t && (this._expandObserver?.unobserve(n), this._expandRowElements.delete(e)), t && (this._expandRowElements.set(e, t), this._expandRowKeys.set(t, e), this.virtualized && this._ensureExpandObserver().observe(t));
124
+ }, this._expandRowRefs.set(e, t)), t;
125
+ }
126
+ _rescueFocusAfterWindowChange() {
127
+ if (!this._focusInsideRows || !(this._windowStart !== this._previousWindowStart || this._windowEnd !== this._previousWindowEnd)) return;
128
+ if (document.activeElement !== this) {
129
+ this._clearRowFocusTracking();
130
+ return;
131
+ }
132
+ let e = this.shadowRoot?.activeElement ?? null;
133
+ if (e) {
134
+ let t = this._rowIndexOf(e);
135
+ if (t === null || t === this._focusedRowIndex) return;
136
+ }
137
+ this._clearRowFocusTracking(), this._scrollContainer?.focus({ preventScroll: !0 });
138
+ }
139
+ _clampScrollToContent() {
140
+ let e = this._scrollContainer;
141
+ if (!e) return;
142
+ let t = Math.max(0, e.scrollHeight - e.clientHeight);
143
+ e.scrollTop > t && (e.scrollTop = t), Math.abs(this._scrollTop - e.scrollTop) > .5 && (this._scrollTop = e.scrollTop);
144
+ }
145
+ _ensureExpandObserver() {
146
+ return this._expandObserver ||= new ResizeObserver((e) => {
147
+ let t = !1, n = 0;
148
+ for (let r of e) {
149
+ let e = this._expandRowKeys.get(r.target);
150
+ if (e === void 0) continue;
151
+ let i = r.borderBoxSize?.[0]?.blockSize ?? r.target.offsetHeight, a = this._expandedHeights.get(e) ?? 0;
152
+ if (Math.abs(a - i) < .5) continue;
153
+ this._expandedHeights.set(e, i), t = !0;
154
+ let o = this._keyToIndex.get(e);
155
+ o !== void 0 && o < this._windowStart && (n += i - a);
156
+ }
157
+ t && (n !== 0 && this._scrollContainer && (this._scrollContainer.scrollTop += n, this._scrollTop = this._scrollContainer.scrollTop), this.requestUpdate());
158
+ }), this._expandObserver;
159
+ }
160
+ _renderSpacerRow(e, t) {
161
+ return e <= 0 ? i : r`
162
+ <tr class="spacer-row" aria-hidden="true" data-position=${t} style=${`height: ${e}px`}>
163
+ <td class="spacer-cell" colspan=${this.columns.length + +!!this.expandable}></td>
164
+ </tr>
165
+ `;
166
+ }
40
167
  _resolveKey(e, t) {
41
168
  return this.getRowKey ? this.getRowKey(e, t) : String(t);
42
169
  }
@@ -63,14 +190,13 @@ var d = class extends e {
63
190
  }
64
191
  toggleExpand(e) {
65
192
  let t, n, r, i = typeof e == "number" && e === Math.trunc(e) && e >= 0 && e < this.rows.length;
66
- i && this.getRowKey && !this._warnedNumericTarget && u() && (this._warnedNumericTarget = !0, console.warn("[reke-table] toggleExpand received a numeric target while `getRowKey` is set; in-range numeric targets are interpreted as row INDICES, not keys. Pass the resolved key to target by identity.")), i ? (n = e, r = this.rows[n], t = this._resolveKey(r, n)) : (t = e, n = this.rows.findIndex((e, n) => this._resolveKey(e, n) === t), r = n >= 0 ? this.rows[n] : void 0);
193
+ i && this.getRowKey && !this._warnedNumericTarget && p() && (this._warnedNumericTarget = !0, console.warn("[reke-table] toggleExpand received a numeric target while `getRowKey` is set; in-range numeric targets are interpreted as row INDICES, not keys. Pass the resolved key to target by identity.")), i ? (n = e, r = this.rows[n], t = this._resolveKey(r, n)) : (t = e, n = this.rows.findIndex((e, n) => this._resolveKey(e, n) === t), r = n >= 0 ? this.rows[n] : void 0);
67
194
  let a = new Set(this.expandedRows), o = !a.has(t);
68
195
  if (o) {
69
- if (a.add(t), this._enteringKeys.add(t), this._collapsingKeys.delete(t)) {
70
- let e = this._collapseEndHandlers.get(t);
71
- e && (this._getOrCreateHost(t).parentElement?.parentElement?.removeEventListener("transitionend", e), this._collapseEndHandlers.delete(t));
72
- }
73
- } else this._collapsingKeys.add(t);
196
+ a.add(t);
197
+ let e = this._collapsingKeys.delete(t);
198
+ this._collapseTokens.delete(t), !e && !this._mountedKeys.has(t) && this._enteringKeys.add(t);
199
+ } else a.delete(t), this._collapsingKeys.add(t), this._enteringKeys.delete(t);
74
200
  this.expandedRows = a, this.emit("reke-row-expand", {
75
201
  row: r,
76
202
  index: n,
@@ -98,22 +224,16 @@ var d = class extends e {
98
224
  return t || (t = (t) => {
99
225
  if (!t) return;
100
226
  let n = t, r = this._getOrCreateHost(e);
101
- r.parentElement !== n && n.appendChild(r);
102
- let i = n.parentElement;
103
- if (i && !this._collapseEndHandlers.has(e)) {
104
- let t = (n) => {
105
- n.propertyName !== "grid-template-rows" || !this._collapsingKeys.has(e) || (this._collapsingKeys.delete(e), this._collapseEndHandlers.delete(e), i.removeEventListener("transitionend", t), this._safeCleanup(e), this._hostCache.delete(e), this._mountedKeys.delete(e), this._refCallbacks.delete(e), this.expandedRows.has(e) && (this.expandedRows = new Set([...this.expandedRows].filter((t) => t !== e))));
106
- };
107
- i.addEventListener("transitionend", t), this._collapseEndHandlers.set(e, t);
108
- }
227
+ r.parentElement !== n && n.replaceChildren(r);
109
228
  }, this._refCallbacks.set(e, t)), t;
110
229
  }
111
230
  _renderRow(e, t, n) {
112
- let a = this.expandedRows.has(n), o = `reke-table-expand-${String(n)}`, s = this.columns.length + +!!this.expandable;
231
+ let a = this.expandedRows.has(n), o = `reke-table-expand-${String(n)}`, s = this.columns.length + +!!this.expandable, c = this.expandedRowElement != null && (a || this._collapsingKeys.has(n)) && this._keyToRow.get(n) === e;
113
232
  return r`
114
233
  <tr
115
234
  part="row"
116
235
  class="row ${t % 2 == 1 ? "row--even" : ""} ${a ? "row--expanded" : ""}"
236
+ aria-rowindex=${this.virtualized ? t + 2 : i}
117
237
  @click=${() => this.handleRowClick(e, t)}
118
238
  >
119
239
  ${this.expandable ? r`
@@ -145,10 +265,12 @@ var d = class extends e {
145
265
  </td>
146
266
  `)}
147
267
  </tr>
148
- ${this.expandedRowElement && this._keyToRow.get(n) === e ? r`
268
+ ${c ? r`
149
269
  <tr
150
270
  part="expand-row"
151
271
  class="expand-row ${a && !this._enteringKeys.has(n) ? "" : "expand-row--collapsed"}"
272
+ aria-rowindex=${this.virtualized ? t + 2 : i}
273
+ ${u(this._expandRowRef(n))}
152
274
  >
153
275
  <td
154
276
  part="expand-content"
@@ -157,7 +279,7 @@ var d = class extends e {
157
279
  colspan=${s}
158
280
  >
159
281
  <div class="expand-grid">
160
- <div class="expand-inner" ${l(this._expandTdRef(n))}></div>
282
+ <div class="expand-inner" ${u(this._expandTdRef(n))}></div>
161
283
  </div>
162
284
  </td>
163
285
  </tr>
@@ -165,33 +287,32 @@ var d = class extends e {
165
287
  `;
166
288
  }
167
289
  willUpdate(e) {
168
- let t = u();
169
- t && this.expandedRowRender != null && !this._warnedLegacyApi && (this._warnedLegacyApi = !0, console.error("[reke-table] `expandedRowRender` was removed. Use `expandedRowElement(host, row, key) => Cleanup | void` instead."));
170
- let n = /* @__PURE__ */ new Map();
290
+ let t = p();
291
+ if (t && this.expandedRowRender != null && !this._warnedLegacyApi && (this._warnedLegacyApi = !0, console.error("[reke-table] `expandedRowRender` was removed. Use `expandedRowElement(host, row, key) => Cleanup | void` instead.")), t && this.virtualized && !this._warnedVirtualConfig) {
292
+ let e = [];
293
+ this.rowHeight <= 0 && e.push("`row-height` must be a positive number — row offsets are computed from it"), this.maxHeight || e.push("`max-height` is required — windowing needs a bounded scroll container"), e.length > 0 && (this._warnedVirtualConfig = !0, console.error(`[reke-table] virtualized: ${e.join("; ")}.`));
294
+ }
295
+ let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
171
296
  for (let e = 0; e < this.rows.length; e += 1) {
172
- let r = this.rows[e], i = this._resolveKey(r, e);
173
- n.has(i) && t && !this._warnedDupKeys.has(i) && (this._warnedDupKeys.add(i), console.warn(`[reke-table] Duplicate getRowKey value detected: ${JSON.stringify(i)}. Last row with this key wins for expand bookkeeping.`)), n.set(i, r);
297
+ let i = this.rows[e], a = this._resolveKey(i, e);
298
+ r.set(a, e), n.has(a) && t && !this._warnedDupKeys.has(a) && (this._warnedDupKeys.add(a), console.warn(`[reke-table] Duplicate getRowKey value detected: ${JSON.stringify(a)}. Last row with this key wins for expand bookkeeping.`)), n.set(a, i);
174
299
  }
175
- this._keyToRow = n;
300
+ this._keyToRow = n, this._keyToIndex = r;
176
301
  }
177
302
  updated(e) {
178
- if (!this.expandedRowElement) {
303
+ if (this.virtualized && (this._rescueFocusAfterWindowChange(), this._clampScrollToContent()), !this.expandedRowElement) {
179
304
  this._runAllCleanupsAndClear();
180
305
  for (let e of Array.from(this.expandedRows)) this._keyToRow.has(e) || this.expandedRows.delete(e);
181
306
  return;
182
307
  }
183
- let t = /* @__PURE__ */ new Set([...this.expandedRows, ...this._hostCache.keys()]);
308
+ let t = /* @__PURE__ */ new Set([
309
+ ...this.expandedRows,
310
+ ...this._collapsingKeys,
311
+ ...this._hostCache.keys()
312
+ ]);
184
313
  for (let e of t) {
185
- let t = this._keyToRow.has(e), n = this.expandedRows.has(e);
186
- t && n || this._collapsingKeys.has(e) || (this._safeCleanup(e), this._hostCache.delete(e), this._mountedKeys.delete(e), this._refCallbacks.delete(e), !t && !this._collapsingKeys.has(e) && this.expandedRows.delete(e));
187
- }
188
- if (this._collapsingKeys.size > 0) {
189
- let e = [...this._collapsingKeys];
190
- requestAnimationFrame(() => {
191
- let t = new Set(this.expandedRows);
192
- for (let n of e) t.delete(n);
193
- this.expandedRows = t;
194
- });
314
+ let t = this._keyToRow.has(e);
315
+ t && (this.expandedRows.has(e) || this._collapsingKeys.has(e)) || (this._teardownKey(e), t || this.expandedRows.delete(e));
195
316
  }
196
317
  for (let e of this.expandedRows) {
197
318
  if (this._mountedKeys.has(e)) continue;
@@ -200,10 +321,31 @@ var d = class extends e {
200
321
  let n = this._getOrCreateHost(e), r = this.expandedRowElement(n, t, e);
201
322
  typeof r == "function" && this._cleanupMap.set(e, r), this._mountedKeys.add(e);
202
323
  }
324
+ for (let e of this._collapsingKeys) this._collapseTokens.has(e) || this._scheduleCollapseTeardown(e);
203
325
  this._enteringKeys.size > 0 && (this.offsetHeight, requestAnimationFrame(() => {
204
- this._enteringKeys.clear(), this.requestUpdate();
326
+ this._enteringKeys.size !== 0 && (this._enteringKeys.clear(), this.requestUpdate());
205
327
  }));
206
328
  }
329
+ _scheduleCollapseTeardown(e) {
330
+ this._collapseSeq += 1;
331
+ let t = this._collapseSeq;
332
+ this._collapseTokens.set(e, t);
333
+ let n = this._hostCache.get(e)?.parentElement?.parentElement ?? null, r = [];
334
+ n && (getComputedStyle(n).gridTemplateRows, r = n.getAnimations({ subtree: !0 }));
335
+ let i = new Promise((e) => {
336
+ requestAnimationFrame(() => e());
337
+ }), a = Promise.all([Promise.allSettled(r.map((e) => e.finished)), i]), o = new Promise((e) => {
338
+ setTimeout(e, d);
339
+ });
340
+ Promise.race([a, o]).then(() => {
341
+ this._collapseTokens.get(e) === t && (this._teardownKey(e), this.requestUpdate());
342
+ });
343
+ }
344
+ _teardownKey(e) {
345
+ this._safeCleanup(e), this._hostCache.get(e)?.remove(), this._hostCache.delete(e), this._mountedKeys.delete(e), this._refCallbacks.delete(e), this._collapsingKeys.delete(e), this._collapseTokens.delete(e), this._enteringKeys.delete(e);
346
+ let t = this._expandRowElements.get(e);
347
+ t && this._expandObserver?.unobserve(t), this._expandRowElements.delete(e), this._expandRowRefs.delete(e), this._expandedHeights.delete(e);
348
+ }
207
349
  _safeCleanup(e) {
208
350
  let t = this._cleanupMap.get(e);
209
351
  if (t) {
@@ -214,15 +356,16 @@ var d = class extends e {
214
356
  }
215
357
  }
216
358
  _runAllCleanupsAndClear() {
217
- for (let [e, t] of this._collapseEndHandlers) (this._hostCache.get(e)?.parentElement?.parentElement)?.removeEventListener("transitionend", t);
218
- this._collapsingKeys.clear(), this._collapseEndHandlers.clear();
359
+ this._collapsingKeys.clear(), this._collapseTokens.clear(), this._enteringKeys.clear();
219
360
  for (let e of this._cleanupMap.values()) try {
220
361
  e();
221
362
  } catch {}
222
- this._cleanupMap.clear(), this._hostCache.clear(), this._mountedKeys.clear(), this._refCallbacks.clear();
363
+ this._cleanupMap.clear();
364
+ for (let e of this._hostCache.values()) e.remove();
365
+ this._hostCache.clear(), this._expandObserver?.disconnect(), this._expandRowElements.clear(), this._expandRowRefs.clear(), this._expandedHeights.clear(), this._mountedKeys.clear(), this._refCallbacks.clear();
223
366
  }
224
367
  disconnectedCallback() {
225
- super.disconnectedCallback(), this._runAllCleanupsAndClear();
368
+ super.disconnectedCallback(), this._runAllCleanupsAndClear(), this._scrollContainer?.removeEventListener("scroll", this._onScroll), this._scrollContainer = null, this._viewportObserver?.disconnect(), this._viewportObserver = null, this._expandObserver?.disconnect(), this._expandObserver = null, this._scrollFrame !== null && (cancelAnimationFrame(this._scrollFrame), this._scrollFrame = null);
226
369
  }
227
370
  render() {
228
371
  let e = {
@@ -230,9 +373,10 @@ var d = class extends e {
230
373
  "table--striped": this.striped,
231
374
  "table--dense": this.dense,
232
375
  "table--hoverable": this.hoverable,
233
- "table--bordered": this.bordered
234
- };
235
- return r`
376
+ "table--bordered": this.bordered,
377
+ "table--fixed-layout": this.virtualized
378
+ }, { start: t, end: n, topSpacer: a, bottomSpacer: o } = this._computeWindow(), s = this.rows.length, d = this.virtualized ? this.rows.slice(t, n) : this.rows;
379
+ return this._previousWindowStart = this._windowStart, this._previousWindowEnd = this._windowEnd, this._windowStart = t, this._windowEnd = n, r`
236
380
  <div class="table-container">
237
381
  ${this._hasToolbar ? r`
238
382
  <div part="toolbar" class="table-toolbar">
@@ -240,8 +384,20 @@ var d = class extends e {
240
384
  </div>
241
385
  ` : r`<slot name="toolbar" @slotchange=${this._onToolbarSlotChange} style="display:none"></slot>`}
242
386
 
243
- <div class="table-wrapper">
244
- <table part="table" class=${c(e)} role="table">
387
+ <div
388
+ class="table-wrapper ${this.virtualized ? "table-wrapper--virtualized" : ""}"
389
+ style=${this.virtualized && this.maxHeight ? `max-height: ${this.maxHeight}` : ""}
390
+ tabindex=${this.virtualized ? 0 : i}
391
+ role=${this.virtualized ? "group" : i}
392
+ aria-label=${this.virtualized ? "Scrollable table" : i}
393
+ ${u(this._bindScrollContainer)}
394
+ >
395
+ <table
396
+ part="table"
397
+ class=${c(e)}
398
+ role="table"
399
+ aria-rowcount=${this.virtualized ? s : i}
400
+ >
245
401
  <thead part="header">
246
402
  <tr>
247
403
  ${this.expandable ? r`
@@ -267,11 +423,23 @@ var d = class extends e {
267
423
  `)}
268
424
  </tr>
269
425
  </thead>
270
- <tbody part="body">
271
- ${this.rows.map((e, t) => {
272
- let n = this._resolveKey(e, t);
273
- return this._renderRow(e, t, n);
426
+ <tbody part="body" @focusin=${this._onRowsFocusIn}>
427
+ ${this._renderSpacerRow(a, "top")}
428
+ ${d.map((e, n) => {
429
+ let r = t + n, i = this._resolveKey(e, r);
430
+ return l([
431
+ e,
432
+ r,
433
+ this.rows,
434
+ this.columns,
435
+ this.expandable,
436
+ this.expandedRowElement,
437
+ this.expandedRows.has(i),
438
+ this._collapsingKeys.has(i),
439
+ this._enteringKeys.has(i)
440
+ ], () => this._renderRow(e, r, i));
274
441
  })}
442
+ ${this._renderSpacerRow(o, "bottom")}
275
443
  ${this.rows.length === 0 ? r`
276
444
  <tr class="row row--empty">
277
445
  <td
@@ -295,34 +463,40 @@ var d = class extends e {
295
463
  `;
296
464
  }
297
465
  };
298
- t([o({ attribute: !1 })], d.prototype, "columns", void 0), t([o({ attribute: !1 })], d.prototype, "rows", void 0), t([o({
466
+ t([o({ attribute: !1 })], m.prototype, "columns", void 0), t([o({ attribute: !1 })], m.prototype, "rows", void 0), t([o({
299
467
  type: Boolean,
300
468
  reflect: !0
301
- })], d.prototype, "striped", void 0), t([o({
469
+ })], m.prototype, "striped", void 0), t([o({
302
470
  type: Boolean,
303
471
  reflect: !0
304
- })], d.prototype, "dense", void 0), t([o({
472
+ })], m.prototype, "dense", void 0), t([o({
305
473
  type: Boolean,
306
474
  reflect: !0
307
- })], d.prototype, "hoverable", void 0), t([o({
475
+ })], m.prototype, "hoverable", void 0), t([o({
308
476
  type: Boolean,
309
477
  reflect: !0
310
- })], d.prototype, "bordered", void 0), t([o({
478
+ })], m.prototype, "bordered", void 0), t([o({
311
479
  type: Boolean,
312
480
  reflect: !0
313
- })], d.prototype, "borderless", void 0), t([o({
481
+ })], m.prototype, "borderless", void 0), t([o({
314
482
  type: Boolean,
315
483
  reflect: !0
316
- })], d.prototype, "expandable", void 0), t([o({
484
+ })], m.prototype, "expandable", void 0), t([o({
317
485
  type: Boolean,
318
486
  reflect: !0,
319
487
  attribute: "expand-on-row-click"
320
- })], d.prototype, "expandOnRowClick", void 0), t([o({
488
+ })], m.prototype, "expandOnRowClick", void 0), t([o({
489
+ type: Boolean,
490
+ reflect: !0
491
+ })], m.prototype, "virtualized", void 0), t([o({
492
+ type: Number,
493
+ attribute: "row-height"
494
+ })], m.prototype, "rowHeight", void 0), t([o({ attribute: "max-height" })], m.prototype, "maxHeight", void 0), t([o({ type: Number })], m.prototype, "overscan", void 0), t([o({
321
495
  reflect: !0,
322
496
  attribute: "sort-key"
323
- })], d.prototype, "sortKey", void 0), t([o({
497
+ })], m.prototype, "sortKey", void 0), t([o({
324
498
  reflect: !0,
325
499
  attribute: "sort-direction"
326
- })], 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);
500
+ })], m.prototype, "sortDirection", void 0), t([o({ attribute: !1 })], m.prototype, "expandedRowElement", void 0), t([o({ attribute: !1 })], m.prototype, "getRowKey", void 0), t([o({ attribute: !1 })], m.prototype, "expandedRows", void 0), t([s()], m.prototype, "_hasToolbar", void 0), t([s()], m.prototype, "_hasFooter", void 0), t([s()], m.prototype, "_scrollTop", void 0), t([s()], m.prototype, "_viewportHeight", void 0), m = t([a("reke-table")], m);
327
501
  //#endregion
328
- export { d as RekeTable };
502
+ export { m as RekeTable };
@@ -1 +1 @@
1
- {"version":3,"file":"reke-table.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-table/reke-table.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BAkSlB,CAAC"}
1
+ {"version":3,"file":"reke-table.styles.d.ts","sourceRoot":"","sources":["../../../src/components/reke-table/reke-table.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,2BA+TlB,CAAC"}
@@ -18,6 +18,35 @@ var n = [e, t`
18
18
  overflow-x: auto;
19
19
  }
20
20
 
21
+ /* === Virtualization === */
22
+
23
+ /* The scroll container the window is computed against. Its max-height is
24
+ set inline from the maxHeight prop. */
25
+ .table-wrapper--virtualized {
26
+ overflow-y: auto;
27
+ }
28
+
29
+ /* Column widths must not depend on which rows happen to be rendered, or they
30
+ would shift while scrolling. Fixed layout resolves them from the header. */
31
+ .table--fixed-layout {
32
+ table-layout: fixed;
33
+ }
34
+
35
+ .table-wrapper--virtualized thead {
36
+ position: sticky;
37
+ top: 0;
38
+ z-index: 1;
39
+ }
40
+
41
+ /* Stands in for the rows outside the window. Contributes scroll height and
42
+ nothing else — no padding, no borders, not exposed to assistive tech. */
43
+ .spacer-row,
44
+ .spacer-cell {
45
+ padding: 0;
46
+ border: none;
47
+ background: none;
48
+ }
49
+
21
50
  .table {
22
51
  width: 100%;
23
52
  border-collapse: collapse;
@@ -1,4 +1,4 @@
1
1
  //#region src/shared/tailwind.css?inline
2
- var e = "/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--shadow-sm:0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.fixed{position:fixed}.relative{position:relative}.static{position:static}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.flex-shrink{flex-shrink:1}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.border{border-style:var(--tw-border-style);border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}";
2
+ var e = "/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--shadow-sm:0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.row-0{grid-row:0}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.flex-shrink{flex-shrink:1}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.border{border-style:var(--tw-border-style);border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}";
3
3
  //#endregion
4
4
  export { e as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reke-ui",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Web Component library built with Lit 3 — dark & light themes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -123,6 +123,7 @@
123
123
  "check": "biome check src",
124
124
  "check:ci": "biome ci src",
125
125
  "test:coverage": "vitest run --coverage",
126
+ "bench:table": "VITE_BENCH=1 vitest run src/components/reke-table/reke-table.bench.test.ts",
126
127
  "release": "commit-and-tag-version",
127
128
  "prepublishOnly": "npm run build && npm run analyze"
128
129
  },