@emamid/svelte-data-table 0.0.6 → 0.0.8
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.
package/dist/DataTable.svelte
CHANGED
|
@@ -36,6 +36,12 @@ export let trClassAppend = "";
|
|
|
36
36
|
export let trClassOverride = "";
|
|
37
37
|
const trClassDefault = "";
|
|
38
38
|
export let trClassGetter = null;
|
|
39
|
+
export let striped = false;
|
|
40
|
+
export let hoverable = false;
|
|
41
|
+
export let noborder = false;
|
|
42
|
+
export let shadow = false;
|
|
43
|
+
export let color = "default";
|
|
44
|
+
export let customColor = "";
|
|
39
45
|
let sortedItems = [];
|
|
40
46
|
let focusedColumnKeyID = null;
|
|
41
47
|
let focusedItemKey = null;
|
|
@@ -187,7 +193,7 @@ const rowClicked = (item) => {
|
|
|
187
193
|
};
|
|
188
194
|
</script>
|
|
189
195
|
|
|
190
|
-
<Table class={tableClass} {divClass}>
|
|
196
|
+
<Table class={tableClass} {divClass} {striped} {hoverable} {noborder} {shadow} {color} {customColor}>
|
|
191
197
|
<TableHead defaultRow={false} class={theadClass}>
|
|
192
198
|
{#each internalColumns as column}
|
|
193
199
|
<DataTableHeaderCell
|
|
@@ -27,6 +27,12 @@ declare const __propDef: {
|
|
|
27
27
|
trClassAppend?: string | undefined;
|
|
28
28
|
trClassOverride?: string | undefined;
|
|
29
29
|
trClassGetter?: RowClassFunction | null | undefined;
|
|
30
|
+
striped?: boolean | undefined;
|
|
31
|
+
hoverable?: boolean | undefined;
|
|
32
|
+
noborder?: boolean | undefined;
|
|
33
|
+
shadow?: boolean | undefined;
|
|
34
|
+
color?: string | undefined;
|
|
35
|
+
customColor?: string | undefined;
|
|
30
36
|
};
|
|
31
37
|
events: {
|
|
32
38
|
action: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { TableHeadCell } from "flowbite-svelte";
|
|
2
|
-
import {
|
|
2
|
+
import { AngleDownSolid, AngleUpSolid } from "flowbite-svelte-icons";
|
|
3
3
|
import { joinClasses } from "./common.js";
|
|
4
4
|
export let column;
|
|
5
5
|
export let reverseSort;
|
|
@@ -13,9 +13,9 @@ export let thClass;
|
|
|
13
13
|
>
|
|
14
14
|
{#if isSorted}
|
|
15
15
|
{#if reverseSort}
|
|
16
|
-
<
|
|
16
|
+
<AngleUpSolid class="inline h-3 w-3" />
|
|
17
17
|
{:else}
|
|
18
|
-
<
|
|
18
|
+
<AngleDownSolid class="inline h-3 w-3" />
|
|
19
19
|
{/if}
|
|
20
20
|
{/if}
|
|
21
21
|
<span>{column.title}</span>
|
package/dist/common.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ column: ColumnConfig,
|
|
|
32
32
|
value: CellValue,
|
|
33
33
|
/** True if the cell is focused. */
|
|
34
34
|
isFocused: boolean,
|
|
35
|
-
/** Classes as
|
|
35
|
+
/** Classes as determined by grid and column properties and focus state. */
|
|
36
36
|
calcClass: string,
|
|
37
37
|
/** Default classes for a TableBodyCell component as defined by FlowBite. */
|
|
38
38
|
defaultClass: string,
|