@hyvor/design 1.0.7 → 1.0.9
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/components/Table/Table.svelte +1 -7
- package/dist/components/Table/TableCell.svelte +16 -0
- package/dist/components/Table/TableCell.svelte.d.ts +8 -0
- package/dist/components/Table/TableRow.svelte +4 -2
- package/dist/components/Table/TableRow.svelte.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/package.json +1 -1
|
@@ -10,12 +10,6 @@
|
|
|
10
10
|
const hoverCss = hover ? '--local-hover-color: var(--hover);' : '';
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
|
-
<div
|
|
14
|
-
class="table"
|
|
15
|
-
style="
|
|
16
|
-
--local-columns: {columns};
|
|
17
|
-
{hoverCss}
|
|
18
|
-
"
|
|
19
|
-
>
|
|
13
|
+
<div class="table" style="--local-columns: {columns};{hoverCss}" role="table">
|
|
20
14
|
{@render children?.()}
|
|
21
15
|
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getContext, type Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
children: Snippet;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { children, ...rest }: Props = $props();
|
|
10
|
+
|
|
11
|
+
const { head } = getContext<{ head: boolean }>('table-row');
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div role={head ? 'columnheader' : 'cell'} {...rest}>
|
|
15
|
+
{@render children()}
|
|
16
|
+
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type
|
|
2
|
+
import { setContext, type Snippet } from 'svelte';
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
head?: boolean;
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const { head = false, children, ...rest }: Props = $props();
|
|
10
|
+
|
|
11
|
+
setContext('table-row', { head });
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
|
-
<div class:head {...rest}>
|
|
14
|
+
<div class:head {...rest} role="row">
|
|
13
15
|
{@render children()}
|
|
14
16
|
</div>
|
|
15
17
|
|
|
@@ -33,6 +33,7 @@ export { default as SplitControl } from './SplitControl/SplitControl.svelte';
|
|
|
33
33
|
export { default as Switch } from './Switch/Switch.svelte';
|
|
34
34
|
export { default as Table } from './Table/Table.svelte';
|
|
35
35
|
export { default as TableRow } from './Table/TableRow.svelte';
|
|
36
|
+
export { default as TableCell } from './Table/TableCell.svelte';
|
|
36
37
|
export { default as TabNav } from './TabNav/TabNav.svelte';
|
|
37
38
|
export { default as TabNavItem } from './TabNav/TabNavItem.svelte';
|
|
38
39
|
export { default as Tag } from './Tag/Tag.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -33,6 +33,7 @@ export { default as SplitControl } from './SplitControl/SplitControl.svelte';
|
|
|
33
33
|
export { default as Switch } from './Switch/Switch.svelte';
|
|
34
34
|
export { default as Table } from './Table/Table.svelte';
|
|
35
35
|
export { default as TableRow } from './Table/TableRow.svelte';
|
|
36
|
+
export { default as TableCell } from './Table/TableCell.svelte';
|
|
36
37
|
export { default as TabNav } from './TabNav/TabNav.svelte';
|
|
37
38
|
export { default as TabNavItem } from './TabNav/TabNavItem.svelte';
|
|
38
39
|
export { default as Tag } from './Tag/Tag.svelte';
|
package/package.json
CHANGED