@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.
@@ -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
- class="h-auto w-full overflow-visible"
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
- class="h-auto w-full overflow-visible"
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
- class="h-auto w-full overflow-visible"
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
- class="h-auto w-full overflow-visible"
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
- class="h-auto w-full overflow-visible"
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, {}, "">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.21.31",
3
+ "version": "0.21.32",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",