@hyvor/design 1.0.6 → 1.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/components/Modal/Modal.svelte +1 -1
- package/dist/components/SplitControl/SplitControl.svelte +17 -2
- package/dist/components/SplitControl/SplitControl.svelte.d.ts +1 -0
- 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/package.json +1 -1
|
@@ -10,12 +10,27 @@
|
|
|
10
10
|
flex?: number[];
|
|
11
11
|
children?: Snippet;
|
|
12
12
|
nested?: Snippet;
|
|
13
|
+
[key: string]: any;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
label,
|
|
18
|
+
caption,
|
|
19
|
+
column = false,
|
|
20
|
+
flex = [1, 2],
|
|
21
|
+
children,
|
|
22
|
+
nested,
|
|
23
|
+
...rest
|
|
24
|
+
}: Props = $props();
|
|
16
25
|
</script>
|
|
17
26
|
|
|
18
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
class="split-control"
|
|
29
|
+
class:has-nested={!!nested}
|
|
30
|
+
class:column
|
|
31
|
+
aria-label={typeof label === 'string' ? label : undefined}
|
|
32
|
+
{...rest}
|
|
33
|
+
>
|
|
19
34
|
<div class="left" style:flex={flex[0]}>
|
|
20
35
|
<div class="label-wrap">
|
|
21
36
|
{#if typeof label === 'string'}
|
|
@@ -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
|
|
package/package.json
CHANGED