@spaethtech/svelte-ui 0.21.1-dev.114.c081271 → 0.21.1-dev.116.7683168
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.
|
@@ -347,7 +347,10 @@
|
|
|
347
347
|
style="border-color: {bodyBg}; border-left-color: {bodyBorder}; border-right-color: {bodyBorder}; background-color: {bodyBg}"
|
|
348
348
|
>
|
|
349
349
|
{#if rows.length === 0}
|
|
350
|
-
|
|
350
|
+
<!-- Marked role="row" (like data rows) so any consumer per-row styling — e.g. a
|
|
351
|
+
`[role=row]` top/bottom divider border — lands on the empty-state row too, keeping it the
|
|
352
|
+
same height as a data row by construction (svelte-ui draws no row border itself). -->
|
|
353
|
+
<div role="row" class="flex items-center {cellGap} {cellPad}" style="min-height: {heightVar}">
|
|
351
354
|
{#if hasLead}
|
|
352
355
|
<div class="invisible flex shrink-0 items-center gap-1" aria-hidden="true">
|
|
353
356
|
{#if selectable}<Checkbox {size} tabindex={-1} />{/if}
|
|
@@ -374,7 +377,7 @@
|
|
|
374
377
|
</div>
|
|
375
378
|
{#if hasTail}<div
|
|
376
379
|
class="invisible flex shrink-0 items-center"
|
|
377
|
-
style="width: {heightVar}"
|
|
380
|
+
style="width: {heightVar}; height: {heightVar}"
|
|
378
381
|
aria-hidden="true"
|
|
379
382
|
></div>{/if}
|
|
380
383
|
</div>
|
package/docs/components.md
CHANGED
|
@@ -437,8 +437,13 @@ Config-driven, responsive 12-column data table over a `DataGrid`.
|
|
|
437
437
|
standard-height row reflecting the fetch result — a **spinner + "Loading…"** while `result.loading`,
|
|
438
438
|
**"No results"** once settled and empty, or the **error** (styled `--ui-color-error`) when
|
|
439
439
|
`result.error` is set (a string as-is, an `Error`'s `.message`, else the localized `loadFailed`). An
|
|
440
|
-
errored result never spins, and the row
|
|
441
|
-
|
|
440
|
+
errored result never spins, and the row is **exactly one data row tall** in every state (its
|
|
441
|
+
invisible lead/tail spacers carry the control height), so the table never jumps between Loading,
|
|
442
|
+
rows, No results and error — and you don't need a separate page banner that contradicts a "No
|
|
443
|
+
results" table. (A long error wraps and grows the row; one line is the minimum, not a fixed height.)
|
|
444
|
+
The empty-state row is marked **`role="row"`** like data rows, so if you add your own per-row styling
|
|
445
|
+
(e.g. a `[role="row"]` divider border), it lands on the empty-state row too and heights stay matched
|
|
446
|
+
— svelte-ui itself draws no per-row border. With `localFetch`, drive this by
|
|
442
447
|
passing `loading`/`error` getters (below); a remote `query()` that exposes `.error` gets it for free.
|
|
443
448
|
(`DataGrid.error` is the query-*parse* error surfaced by `<Query>` — a bad filter — which is distinct
|
|
444
449
|
from this fetch/load error.)
|