@r2digisolutions/components 0.21.31 → 0.21.32
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/molecules/AreaLineChart/AreaLineChart.svelte +3 -1
- package/dist/components/molecules/BarChart/BarChart.svelte +3 -1
- package/dist/components/molecules/HorizontalBarChart/HorizontalBarChart.svelte +3 -1
- package/dist/components/molecules/MultiLineChart/MultiLineChart.svelte +3 -1
- package/dist/components/molecules/StackedBarChart/StackedBarChart.svelte +3 -1
- package/dist/components/molecules/Timeline/Timeline.svelte +8 -0
- package/dist/components/molecules/Timeline/Timeline.svelte.d.ts +3 -0
- package/package.json +1 -1
|
@@ -96,7 +96,9 @@
|
|
|
96
96
|
<div class={['relative w-full select-none', className]}>
|
|
97
97
|
<svg
|
|
98
98
|
viewBox={`0 0 ${W} ${height}`}
|
|
99
|
-
|
|
99
|
+
preserveAspectRatio="none"
|
|
100
|
+
class="block w-full overflow-visible"
|
|
101
|
+
style:height={`${height}px`}
|
|
100
102
|
role="img"
|
|
101
103
|
aria-label="Area line chart"
|
|
102
104
|
>
|
|
@@ -79,7 +79,9 @@
|
|
|
79
79
|
<div class={['relative w-full select-none', className]}>
|
|
80
80
|
<svg
|
|
81
81
|
viewBox={`0 0 ${W} ${height}`}
|
|
82
|
-
|
|
82
|
+
preserveAspectRatio="none"
|
|
83
|
+
class="block w-full overflow-visible"
|
|
84
|
+
style:height={`${height}px`}
|
|
83
85
|
role="img"
|
|
84
86
|
aria-label="Bar chart"
|
|
85
87
|
>
|
|
@@ -65,7 +65,9 @@
|
|
|
65
65
|
<div class={['relative w-full select-none', className]}>
|
|
66
66
|
<svg
|
|
67
67
|
viewBox={`0 0 ${W} ${H}`}
|
|
68
|
-
|
|
68
|
+
preserveAspectRatio="none"
|
|
69
|
+
class="block w-full overflow-visible"
|
|
70
|
+
style:height={`${H}px`}
|
|
69
71
|
role="img"
|
|
70
72
|
aria-label="Horizontal bar chart"
|
|
71
73
|
>
|
|
@@ -112,7 +112,9 @@
|
|
|
112
112
|
<div class={['relative w-full select-none', className]}>
|
|
113
113
|
<svg
|
|
114
114
|
viewBox={`0 0 ${W} ${height}`}
|
|
115
|
-
|
|
115
|
+
preserveAspectRatio="none"
|
|
116
|
+
class="block w-full overflow-visible"
|
|
117
|
+
style:height={`${height}px`}
|
|
116
118
|
role="img"
|
|
117
119
|
aria-label="Multi-line chart"
|
|
118
120
|
>
|
|
@@ -100,7 +100,9 @@
|
|
|
100
100
|
<div class="relative w-full select-none">
|
|
101
101
|
<svg
|
|
102
102
|
viewBox={`0 0 ${W} ${height}`}
|
|
103
|
-
|
|
103
|
+
preserveAspectRatio="none"
|
|
104
|
+
class="block w-full overflow-visible"
|
|
105
|
+
style:height={`${height}px`}
|
|
104
106
|
role="img"
|
|
105
107
|
aria-label="Stacked bar chart"
|
|
106
108
|
>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
2
4
|
export interface TimelineItem {
|
|
3
5
|
id: string;
|
|
4
6
|
title: string;
|
|
@@ -12,6 +14,8 @@
|
|
|
12
14
|
size?: 'sm' | 'md' | 'lg';
|
|
13
15
|
/** Connect dots with a continuous vertical line */
|
|
14
16
|
showConnectors?: boolean;
|
|
17
|
+
/** Optional extra content under each item (thumbnails, badges, …). */
|
|
18
|
+
content?: Snippet<[TimelineItem, number]>;
|
|
15
19
|
class?: string;
|
|
16
20
|
}
|
|
17
21
|
|
|
@@ -19,6 +23,7 @@
|
|
|
19
23
|
items = [],
|
|
20
24
|
size = 'md',
|
|
21
25
|
showConnectors = true,
|
|
26
|
+
content,
|
|
22
27
|
class: className = ''
|
|
23
28
|
}: TimelineProps = $props();
|
|
24
29
|
|
|
@@ -114,6 +119,9 @@
|
|
|
114
119
|
{#if item.description}
|
|
115
120
|
<p class={['mt-0.5 text-secondary', sizeClasses.desc]}>{item.description}</p>
|
|
116
121
|
{/if}
|
|
122
|
+
{#if content}
|
|
123
|
+
{@render content(item, index)}
|
|
124
|
+
{/if}
|
|
117
125
|
</div>
|
|
118
126
|
</li>
|
|
119
127
|
{/each}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
1
2
|
export interface TimelineItem {
|
|
2
3
|
id: string;
|
|
3
4
|
title: string;
|
|
@@ -10,6 +11,8 @@ interface TimelineProps {
|
|
|
10
11
|
size?: 'sm' | 'md' | 'lg';
|
|
11
12
|
/** Connect dots with a continuous vertical line */
|
|
12
13
|
showConnectors?: boolean;
|
|
14
|
+
/** Optional extra content under each item (thumbnails, badges, …). */
|
|
15
|
+
content?: Snippet<[TimelineItem, number]>;
|
|
13
16
|
class?: string;
|
|
14
17
|
}
|
|
15
18
|
declare const Timeline: import("svelte").Component<TimelineProps, {}, "">;
|