@skeletonlabs/skeleton 2.4.0-dev.54c5fba0 → 2.4.0-dev.6807996
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.
|
@@ -20,6 +20,7 @@ export let regionList = "list-nav";
|
|
|
20
20
|
export let regionItem = "";
|
|
21
21
|
export let regionButton = "w-full";
|
|
22
22
|
export let regionEmpty = "text-center";
|
|
23
|
+
export let filter = filterOptions;
|
|
23
24
|
export let transitions = !$prefersReducedMotionStore;
|
|
24
25
|
export let transitionIn = slide;
|
|
25
26
|
export let transitionInParams = { duration: 200 };
|
|
@@ -56,7 +57,7 @@ function onSelection(option) {
|
|
|
56
57
|
$:
|
|
57
58
|
filterByAllowDeny(allowlist, denylist);
|
|
58
59
|
$:
|
|
59
|
-
optionsFiltered = input ?
|
|
60
|
+
optionsFiltered = input ? filter() : listedOptions;
|
|
60
61
|
$:
|
|
61
62
|
sliceLimit = limit ?? optionsFiltered.length;
|
|
62
63
|
$:
|
|
@@ -28,6 +28,8 @@ declare class __sveltets_Render<Value = unknown, Meta = unknown, TransitionIn ex
|
|
|
28
28
|
regionButton?: string | undefined;
|
|
29
29
|
/** Provide arbitrary classes to empty message.*/
|
|
30
30
|
regionEmpty?: string | undefined;
|
|
31
|
+
/** Provide a custom filter function.*/
|
|
32
|
+
filter?: (() => AutocompleteOption<Value, Meta>[]) | undefined;
|
|
31
33
|
/** Enable/Disable transitions*/
|
|
32
34
|
transitions?: boolean | undefined;
|
|
33
35
|
/** Provide the transition used on entry.*/
|
|
@@ -36,7 +36,7 @@ $:
|
|
|
36
36
|
<table
|
|
37
37
|
class="{classesTable}"
|
|
38
38
|
class:table-interactive={interactive}
|
|
39
|
-
role="grid"
|
|
39
|
+
role={interactive ? "grid" : "table"}
|
|
40
40
|
use:tableA11y
|
|
41
41
|
>
|
|
42
42
|
<!-- on:keydown={(e) => onTableKeydown(elemTable, e)} -->
|
|
@@ -44,7 +44,7 @@ $:
|
|
|
44
44
|
<thead class="table-head {regionHead}">
|
|
45
45
|
<tr>
|
|
46
46
|
{#each source.head as heading }
|
|
47
|
-
<th class="{regionHeadCell}">{@html heading}</th>
|
|
47
|
+
<th class="{regionHeadCell}" role="columnheader">{@html heading}</th>
|
|
48
48
|
{/each}
|
|
49
49
|
</tr>
|
|
50
50
|
</thead>
|
|
@@ -63,9 +63,9 @@ $:
|
|
|
63
63
|
<!-- prettier-ignore -->
|
|
64
64
|
<td
|
|
65
65
|
class="{regionCell}"
|
|
66
|
-
role="gridcell"
|
|
66
|
+
role={interactive ? "gridcell" : "cell"}
|
|
67
67
|
aria-colindex={cellIndex + 1}
|
|
68
|
-
tabindex={cellIndex === 0 ? 0 : -1}
|
|
68
|
+
tabindex={cellIndex === 0 && interactive ? 0 : -1}
|
|
69
69
|
>
|
|
70
70
|
{@html Number(cell) === 0 ? cell : (cell ? cell : '-')}
|
|
71
71
|
</td>
|