@insymetri/styleguide 0.1.94 → 0.1.95
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.
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
size?: 'sm' | 'md'
|
|
44
44
|
/** `card` (default) frames the table; `plain` drops the frame and header fill for hairline rules. */
|
|
45
45
|
variant?: 'card' | 'plain'
|
|
46
|
+
/** Classes on the `<table>` itself — chiefly a `min-w-*`, so narrow viewports scroll rather than squash. */
|
|
47
|
+
tableClass?: string
|
|
46
48
|
class?: string
|
|
47
49
|
}
|
|
48
50
|
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
stickyHeader = false,
|
|
62
64
|
size = 'sm',
|
|
63
65
|
variant = 'card',
|
|
66
|
+
tableClass,
|
|
64
67
|
class: className,
|
|
65
68
|
}: Props = $props()
|
|
66
69
|
|
|
@@ -88,11 +91,11 @@
|
|
|
88
91
|
|
|
89
92
|
<div class={cn(containerClass, className)}>
|
|
90
93
|
{#if children}
|
|
91
|
-
<table class=
|
|
94
|
+
<table class={cn('w-full border-collapse', tableClass)}>
|
|
92
95
|
{@render children()}
|
|
93
96
|
</table>
|
|
94
97
|
{:else}
|
|
95
|
-
<table class=
|
|
98
|
+
<table class={cn('w-full border-collapse', tableClass)}>
|
|
96
99
|
<thead class={cn(headClass, stickyHeader && 'sticky top-0 z-1')}>
|
|
97
100
|
<tr>
|
|
98
101
|
{#each columns as col (col.key)}
|
|
@@ -38,6 +38,8 @@ declare function $$render<T>(): {
|
|
|
38
38
|
size?: "sm" | "md";
|
|
39
39
|
/** `card` (default) frames the table; `plain` drops the frame and header fill for hairline rules. */
|
|
40
40
|
variant?: "card" | "plain";
|
|
41
|
+
/** Classes on the `<table>` itself — chiefly a `min-w-*`, so narrow viewports scroll rather than squash. */
|
|
42
|
+
tableClass?: string;
|
|
41
43
|
class?: string;
|
|
42
44
|
};
|
|
43
45
|
exports: {};
|