@reshape-biotech/design-system 1.2.4 → 1.2.5

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.
Files changed (26) hide show
  1. package/dist/components/button/Button.svelte +7 -7
  2. package/dist/components/collapsible/components/collapsible-trigger.svelte +2 -2
  3. package/dist/components/combobox/components/combobox-content.svelte +1 -1
  4. package/dist/components/datepicker/DatePicker.svelte +2 -2
  5. package/dist/components/graphs/bar-chart/BarChart.svelte +34 -21
  6. package/dist/components/graphs/bar-chart/StackedBarChart.stories.svelte +1 -1
  7. package/dist/components/graphs/bar-chart/StackedBarChart.svelte +36 -23
  8. package/dist/components/graphs/chart/Chart.svelte +0 -2
  9. package/dist/components/graphs/line/LineChart.stories.svelte +1 -1
  10. package/dist/components/graphs/line/LineChart.svelte +37 -19
  11. package/dist/components/graphs/multiline/MultiLineChart.svelte +33 -17
  12. package/dist/components/graphs/utils/tooltipFormatter.js +4 -4
  13. package/dist/components/icon-button/IconButton.svelte +3 -3
  14. package/dist/components/manual-cfu-counter/ManualCFUCounter.svelte +5 -1
  15. package/dist/components/select-new/components/SelectItem.svelte +5 -7
  16. package/dist/components/select-new/components/SelectTrigger.svelte +2 -2
  17. package/dist/components/slider/Slider.svelte +1 -1
  18. package/dist/components/stat-card/StatCard.svelte +1 -1
  19. package/dist/components/status-badge/StatusBadge.svelte +1 -1
  20. package/dist/components/stepper/components/stepper-step.svelte +1 -1
  21. package/dist/components/tag/Tag.svelte +2 -1
  22. package/dist/components/tag/Tag.svelte.d.ts +1 -1
  23. package/dist/tailwind.preset.d.ts +2 -0
  24. package/dist/tokens.d.ts +34 -0
  25. package/dist/tokens.js +25 -4
  26. package/package.json +1 -1
@@ -108,7 +108,7 @@
108
108
 
109
109
  .button:disabled {
110
110
 
111
- background-color: #12192a0d;
111
+ background-color: #12192a0A;
112
112
 
113
113
  --tw-text-opacity: 1;
114
114
 
@@ -119,7 +119,7 @@
119
119
 
120
120
  cursor: not-allowed;
121
121
 
122
- background-color: #12192a0d;
122
+ background-color: #12192a0A;
123
123
 
124
124
  --tw-text-opacity: 1;
125
125
 
@@ -133,7 +133,7 @@
133
133
 
134
134
  .disabled:hover {
135
135
 
136
- background-color: #12192a0d !important
136
+ background-color: #12192a0A !important
137
137
  }
138
138
  /* Size variants */
139
139
  .btn-size-xs {
@@ -205,7 +205,7 @@
205
205
 
206
206
  .btn-secondary {
207
207
 
208
- background-color: #12192a0d;
208
+ background-color: #12192a0A;
209
209
 
210
210
  --tw-text-opacity: 1;
211
211
 
@@ -219,7 +219,7 @@
219
219
 
220
220
  .btn-secondary:active {
221
221
 
222
- background-color: #12192a0d
222
+ background-color: #12192a0A
223
223
  }
224
224
  .btn-transparent {
225
225
 
@@ -231,7 +231,7 @@
231
231
  }
232
232
  .btn-transparent:hover {
233
233
 
234
- background-color: #12192a0d
234
+ background-color: #12192a0A
235
235
  }
236
236
  .btn-danger {
237
237
 
@@ -265,7 +265,7 @@
265
265
 
266
266
  border-color: #12192A26;
267
267
 
268
- background-color: #12192a0d;
268
+ background-color: #12192a0A;
269
269
 
270
270
  --tw-text-opacity: 1;
271
271
 
@@ -7,10 +7,10 @@
7
7
  </script>
8
8
 
9
9
  <Collapsible.Trigger {...props} class="transition-all {props.class}">
10
- <div class="container">
10
+ <div class="container h-8">
11
11
  {@render children()}
12
12
  {#if withIcon}
13
- <Icon iconName="CaretDown" class="icon z-[-1]" />
13
+ <Icon iconName="CaretDown" color="secondary" class="icon z-[-1] m-1" />
14
14
  {/if}
15
15
  </div>
16
16
  </Collapsible.Trigger>
@@ -117,7 +117,7 @@
117
117
  }
118
118
  :global([data-combobox-item][data-highlighted]) {
119
119
 
120
- background-color: #12192a0d
120
+ background-color: #12192a0A
121
121
  }
122
122
 
123
123
  :global([data-combobox-group-label]) {
@@ -181,9 +181,9 @@
181
181
 
182
182
  padding: 1rem;
183
183
 
184
- --tw-shadow: 0 4px 20px 0 rgba(18, 25, 42, 0.06), 0 0 0 0.5px rgba(18, 25, 42, 0.08);
184
+ --tw-shadow: 0 4px 20px 0 rgba(18, 25, 42, 0.06), 0 0 0 1px rgba(18, 25, 42, 0.08);
185
185
 
186
- --tw-shadow-colored: 0 4px 20px 0 var(--tw-shadow-color), 0 0 0 0.5px var(--tw-shadow-color);
186
+ --tw-shadow-colored: 0 4px 20px 0 var(--tw-shadow-color), 0 0 0 1px var(--tw-shadow-color);
187
187
 
188
188
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
189
189
  }
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { textColor, borderColor } from '../../../tokens';
2
+ import { textColor, borderColor, backgroundColor, boxShadow, chartColor } from '../../../tokens';
3
3
  import Chart, { type GenericChartProps } from '../chart/Chart.svelte';
4
4
  import type { EChartsOption, BarSeriesOption } from 'echarts';
5
5
  import { createTooltipFormatter } from '../utils/tooltipFormatter';
@@ -29,13 +29,15 @@
29
29
  }: BarChartProps = $props();
30
30
 
31
31
  const defaultColors: Record<string, string> = {
32
- blue: textColor['icon-blue'],
33
- accent: textColor['icon-accent'],
34
- orange: textColor['icon-orange'],
35
- sky: textColor['icon-sky'],
36
- lilac: textColor['icon-lilac'],
37
- plum: textColor['icon-plum'],
38
- pear: textColor['icon-pear']
32
+ accent: chartColor['accent'],
33
+ blue: chartColor['blue'],
34
+ orange: chartColor['orange'],
35
+ plum: chartColor['plum'],
36
+ sky: chartColor['sky'],
37
+ pear: chartColor['pear'],
38
+ pink: chartColor['pink'],
39
+ lilac: chartColor['lilac'],
40
+ lime: chartColor['lime']
39
41
  };
40
42
  const defaultColorRotationArray = $derived(Object.values(defaultColors));
41
43
 
@@ -55,7 +57,9 @@
55
57
  value,
56
58
  itemStyle: {
57
59
  color,
58
- borderRadius: [2, 2, 0, 0]
60
+ borderRadius: 2,
61
+ borderWidth: 0.5,
62
+ borderColor: borderColor['white']
59
63
  },
60
64
  emphasis: {
61
65
  disabled: true
@@ -89,21 +93,24 @@
89
93
  const options: EChartsOption = $derived.by(() => {
90
94
  return {
91
95
  tooltip: {
92
- trigger: 'item',
96
+ trigger: 'axis',
93
97
  axisPointer: {
94
- type: 'shadow'
98
+ type: 'shadow',
99
+ shadowStyle: {
100
+ color: backgroundColor['neutral']
101
+ }
95
102
  },
96
103
  borderWidth: 0,
97
- extraCssText: 'box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); padding: 8px;',
104
+ borderRadius: 6,
105
+ extraCssText: `box-shadow: ${boxShadow.menu}`,
98
106
  formatter: formatTooltip
99
107
  },
100
108
  grid: {
101
109
  containLabel: true,
102
- left: '3%',
103
- right: '4%',
104
- bottom: '3%',
105
- top: '10%',
106
- ...props.grid
110
+ left: 0,
111
+ right: 16,
112
+ bottom: 16,
113
+ top: 16
107
114
  },
108
115
  xAxis: {
109
116
  type: 'category',
@@ -113,7 +120,7 @@
113
120
  alignWithLabel: true
114
121
  },
115
122
  axisLabel: {
116
- fontSize: 12,
123
+ fontSize: 11,
117
124
  color: textColor['secondary'],
118
125
  show: true,
119
126
  ...(rotateXAxisLabels
@@ -121,13 +128,15 @@
121
128
  : { rotate: 0, overflow: 'truncate', ellipsis: '...', width: 80 })
122
129
  },
123
130
  axisLine: {
124
- show: false
131
+ lineStyle: {
132
+ color: borderColor['axis']
133
+ }
125
134
  }
126
135
  },
127
136
  yAxis: {
128
137
  type: 'value',
129
138
  axisLabel: {
130
- fontSize: 12,
139
+ fontSize: 11,
131
140
  color: textColor['secondary']
132
141
  },
133
142
  axisLine: {
@@ -135,11 +144,15 @@
135
144
  },
136
145
  splitLine: {
137
146
  lineStyle: {
138
- color: borderColor['static'],
147
+ color: borderColor['input'],
139
148
  type: 'dashed'
140
149
  }
141
150
  }
142
151
  },
152
+ textStyle: {
153
+ color: textColor['secondary'],
154
+ fontFamily: 'af Another Sans'
155
+ },
143
156
  series: chartSeries,
144
157
  color: defaultColorRotationArray
145
158
  };
@@ -12,7 +12,7 @@
12
12
  const stackedChartProps = {
13
13
  xAxisCategories: ['ID 1', 'ID 2', 'ID 3', 'ID 4'],
14
14
  series: [
15
- { name: 'Halo', data: [120, 132, 101, 134] },
15
+ { name: 'Halo', data: [100, 132, 101, 134] },
16
16
  { name: 'Spot', data: [220, 182, 191, 234] },
17
17
  { name: 'Microbial', data: [150, 232, 201, 154] }
18
18
  ]
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { textColor, borderColor } from '../../../tokens';
2
+ import { textColor, borderColor, backgroundColor, chartColor, boxShadow } from '../../../tokens';
3
3
  import Chart, { type GenericChartProps } from '../chart/Chart.svelte';
4
4
  import type { EChartsOption, BarSeriesOption } from 'echarts';
5
5
  import type { CallbackDataParams } from 'echarts/types/dist/shared';
@@ -29,13 +29,15 @@
29
29
  }: StackedBarChartProps = $props();
30
30
 
31
31
  const defaultColors: Record<string, string> = {
32
- blue: textColor['icon-blue'],
33
- accent: textColor['icon-accent'],
34
- orange: textColor['icon-orange'],
35
- sky: textColor['icon-sky'],
36
- lilac: textColor['icon-lilac'],
37
- plum: textColor['icon-plum'],
38
- pear: textColor['icon-pear']
32
+ accent: chartColor['accent'],
33
+ blue: chartColor['blue'],
34
+ orange: chartColor['orange'],
35
+ plum: chartColor['plum'],
36
+ sky: chartColor['sky'],
37
+ pear: chartColor['pear'],
38
+ pink: chartColor['pink'],
39
+ lilac: chartColor['lilac'],
40
+ lime: chartColor['lime']
39
41
  };
40
42
  const defaultColorRotationArray = $derived(Object.values(defaultColors));
41
43
 
@@ -55,7 +57,9 @@
55
57
  value,
56
58
  itemStyle: {
57
59
  color,
58
- borderRadius: [2, 2, 0, 0]
60
+ borderRadius: 2,
61
+ borderWidth: 0.5,
62
+ borderColor: borderColor['white']
59
63
  },
60
64
  emphasis: {
61
65
  disabled: true
@@ -93,7 +97,7 @@
93
97
  const firstParam = paramArray[0];
94
98
  const categoryName = firstParam.name;
95
99
 
96
- let tooltipContent = `<div style="font-weight:bold; margin-bottom: 5px;">${categoryName}</div>`;
100
+ let tooltipContent = `<div class="font-medium mb-1 text-primary">${categoryName}</div>`;
97
101
 
98
102
  // Sort tooltip items by value descending for readability
99
103
  paramArray.sort((a, b) => (b.value as number) - (a.value as number));
@@ -120,8 +124,8 @@
120
124
  }
121
125
  }
122
126
 
123
- const marker = `<span style="display:inline-block;margin-right:5px;border-radius:2px;width:10px;height:10px;background-color:${color};"></span>`;
124
- tooltipContent += `<div>${marker}${seriesName}: <span style="font-weight:500;">${value}</span></div>`;
127
+ const marker = `<span class="size-2 rounded-sm" style="background-color:${color}"></span>`;
128
+ tooltipContent += `<div class="flex items-center justify-between gap-4"><span class="flex items-center gap-2">${marker}${seriesName}</span><span class="text-primary">${value}</span></div>`;
125
129
  });
126
130
 
127
131
  return tooltipContent;
@@ -132,19 +136,22 @@
132
136
  tooltip: {
133
137
  trigger: 'axis', // Trigger per category for stacked charts
134
138
  axisPointer: {
135
- type: 'none'
139
+ type: 'shadow',
140
+ shadowStyle: {
141
+ color: backgroundColor['neutral']
142
+ }
136
143
  },
144
+ extraCssText: `box-shadow: ${boxShadow.menu}`,
137
145
  borderWidth: 0,
138
- extraCssText: 'box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); padding: 8px;',
146
+ borderRadius: 6,
139
147
  formatter: formatTooltip
140
148
  },
141
149
  grid: {
142
150
  containLabel: true,
143
- left: '3%',
144
- right: '4%',
145
- bottom: '3%',
146
- top: '10%',
147
- ...props.grid
151
+ left: 0,
152
+ right: 16,
153
+ bottom: 16,
154
+ top: 16
148
155
  },
149
156
  xAxis: {
150
157
  type: 'category',
@@ -154,7 +161,7 @@
154
161
  alignWithLabel: true
155
162
  },
156
163
  axisLabel: {
157
- fontSize: 12,
164
+ fontSize: 11,
158
165
  color: textColor['secondary'],
159
166
  show: true,
160
167
  ...(rotateXAxisLabels
@@ -162,13 +169,15 @@
162
169
  : { rotate: 0, overflow: 'truncate', ellipsis: '...', width: 80 })
163
170
  },
164
171
  axisLine: {
165
- show: false
172
+ lineStyle: {
173
+ color: borderColor['axis']
174
+ }
166
175
  }
167
176
  },
168
177
  yAxis: {
169
178
  type: 'value',
170
179
  axisLabel: {
171
- fontSize: 12,
180
+ fontSize: 11,
172
181
  color: textColor['secondary']
173
182
  },
174
183
  axisLine: {
@@ -176,11 +185,15 @@
176
185
  },
177
186
  splitLine: {
178
187
  lineStyle: {
179
- color: borderColor['static'],
188
+ color: borderColor['input'],
180
189
  type: 'dashed'
181
190
  }
182
191
  }
183
192
  },
193
+ textStyle: {
194
+ color: textColor['secondary'],
195
+ fontFamily: 'af Another Sans'
196
+ },
184
197
  series: chartSeries,
185
198
  color: defaultColorRotationArray
186
199
  };
@@ -62,7 +62,6 @@
62
62
  fontFamily: 'af Another Sans',
63
63
  lineHeight: 14,
64
64
  align: 'center',
65
- fontWeight: 450,
66
65
  color: textColor.secondary,
67
66
  margin: 16
68
67
  },
@@ -86,7 +85,6 @@
86
85
  fontFamily: 'af Another Sans',
87
86
  lineHeight: 14,
88
87
  align: 'center',
89
- fontWeight: 450,
90
88
  color: textColor.secondary,
91
89
  margin: 16
92
90
  },
@@ -16,7 +16,7 @@
16
16
  const data = [
17
17
  10.0, 8.04, 8.07, 6.95, 13.0, 7.58, 9.05, 8.81, 11.0, 8.33, 14.0, 7.66, 13.4, 6.81, 10.0, 6.33,
18
18
  14.0, 8.96, 12.5, 6.82, 9.15, 7.2, 11.5, 7.2, 3.03, 4.23, 12.2, 7.83, 2.02, 4.47, 1.05, 3.33,
19
- 4.05, 4.96, 6.03, 7.24, 12.0, 6.26, 12.0, 8.84, 7.08, 5.82, 5.02, 5.6
19
+ 4.05, 4.96, 6.03, 7.24, 12.0, 6.26, 12.0, 8.84, 7.08, 5.82, 5.02
20
20
  ];
21
21
 
22
22
  const bigData = Array.from({ length: 1000 }, (_, i) => i);
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { textColor } from '../../../tokens';
2
+ import { textColor, borderColor, chartColor, boxShadow } from '../../../tokens';
3
3
  import Chart from '../chart/Chart.svelte';
4
4
  import type { EChartsOption } from 'echarts';
5
5
  import * as echarts from 'echarts/core';
@@ -20,7 +20,7 @@
20
20
  xAxisName,
21
21
  yAxisName,
22
22
  withArea = false,
23
- color = textColor['icon-blue'],
23
+ color = chartColor['accent'],
24
24
  captureInterval,
25
25
  ...props
26
26
  }: LineChartProps = $props();
@@ -52,21 +52,27 @@
52
52
 
53
53
  let options: EChartsOption = $derived({
54
54
  grid: {
55
- top: 10,
56
- bottom: 10,
57
- left: 10,
58
- right: 10,
59
55
  containLabel: true,
60
- ...props.grid
56
+ left: 0,
57
+ right: 16,
58
+ bottom: 16,
59
+ top: 16
61
60
  },
62
61
  textStyle: {
63
- color: textColor['secondary']
62
+ color: textColor['secondary'],
63
+ fontFamily: 'af Another Sans'
64
64
  },
65
65
  xAxis: {
66
66
  type: 'category',
67
67
  boundaryGap: false,
68
+ axisLabel: {
69
+ fontSize: 11
70
+ },
68
71
  axisLine: {
69
- onZero: false
72
+ onZero: false,
73
+ lineStyle: {
74
+ color: borderColor['axis']
75
+ }
70
76
  },
71
77
  data: captureIntervals,
72
78
  ...props.xAxisOptions
@@ -82,19 +88,15 @@
82
88
  formatter: (value: any) => toFixedLocaleString(value.value, 2)
83
89
  }
84
90
  },
85
- ...props.yAxisOptions
86
- },
87
- selectedMode: 'multiple',
88
- tooltip: {
89
- axisPointer: {
90
- type: 'line',
91
+ splitLine: {
91
92
  lineStyle: {
92
- type: 'solid'
93
+ color: borderColor['input'],
94
+ type: 'dashed'
93
95
  }
94
96
  },
95
- trigger: 'axis',
96
- formatter: formatTooltip
97
+ ...props.yAxisOptions
97
98
  },
99
+ selectedMode: 'multiple',
98
100
  series: {
99
101
  type: 'line',
100
102
  symbol: 'circle',
@@ -112,7 +114,7 @@
112
114
  color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
113
115
  {
114
116
  offset: 0,
115
- color: echarts.color.modifyAlpha(color, 0.4)
117
+ color: echarts.color.modifyAlpha(color, 0.2)
116
118
  },
117
119
  {
118
120
  offset: 1,
@@ -121,8 +123,24 @@
121
123
  ])
122
124
  }
123
125
  : undefined
126
+ },
127
+ tooltip: {
128
+ axisPointer: {
129
+ type: 'line',
130
+ z: 0,
131
+ lineStyle: {
132
+ type: 'solid',
133
+ color: borderColor['axis']
134
+ }
135
+ },
136
+ trigger: 'axis',
137
+ borderWidth: 0,
138
+ borderRadius: 6,
139
+ extraCssText: `box-shadow: ${boxShadow.menu}`,
140
+ formatter: formatTooltip
124
141
  }
125
142
  });
143
+ console.log('LineChart options:', options);
126
144
  </script>
127
145
 
128
146
  <Chart
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { textColor } from '../../../tokens';
2
+ import { textColor, borderColor, chartColor, boxShadow } from '../../../tokens';
3
3
  import Chart, { type GenericChartProps } from '../chart/Chart.svelte';
4
4
  import type { ECElementEvent, EChartsOption, LineSeriesOption } from 'echarts';
5
5
  import * as echarts from 'echarts/core';
@@ -65,13 +65,15 @@
65
65
  }
66
66
 
67
67
  const defaultColors: Record<string, string> = {
68
- blue: textColor['icon-blue'],
69
- accent: textColor['icon-accent'],
70
- orange: textColor['icon-orange'],
71
- sky: textColor['icon-sky'],
72
- lilac: textColor['icon-lilac'],
73
- plum: textColor['icon-plum'],
74
- pear: textColor['icon-pear']
68
+ accent: chartColor['accent'],
69
+ blue: chartColor['blue'],
70
+ orange: chartColor['orange'],
71
+ plum: chartColor['plum'],
72
+ sky: chartColor['sky'],
73
+ pear: chartColor['pear'],
74
+ pink: chartColor['pink'],
75
+ lilac: chartColor['lilac'],
76
+ lime: chartColor['lime']
75
77
  };
76
78
  const defaultColorRotationArray = $derived(Object.values(defaultColors));
77
79
 
@@ -99,21 +101,27 @@
99
101
 
100
102
  let options: EChartsOption = $derived.by(() => ({
101
103
  grid: {
102
- top: 10,
103
- bottom: 0,
104
104
  left: 0,
105
- right: 0,
106
- containLabel: true,
107
- ...props.grid
105
+ right: 16,
106
+ bottom: 16,
107
+ top: 16,
108
+ containLabel: true
108
109
  },
109
110
  textStyle: {
110
- color: textColor['secondary']
111
+ color: textColor['secondary'],
112
+ fontFamily: 'af Another Sans'
111
113
  },
112
114
  xAxis: {
113
115
  type: 'category',
114
116
  boundaryGap: false,
117
+ axisLabel: {
118
+ fontSize: 11
119
+ },
115
120
  axisLine: {
116
- onZero: false
121
+ onZero: false,
122
+ lineStyle: {
123
+ color: borderColor['axis']
124
+ }
117
125
  },
118
126
  data: captureIntervals,
119
127
  ...props.xAxisOptions
@@ -129,6 +137,12 @@
129
137
  formatter: (value: any) => toFixedLocaleString(value.value, 2)
130
138
  }
131
139
  },
140
+ splitLine: {
141
+ lineStyle: {
142
+ color: borderColor['input'],
143
+ type: 'dashed'
144
+ }
145
+ },
132
146
  ...props.yAxisOptions
133
147
  },
134
148
  selectedMode: 'multiple',
@@ -136,10 +150,12 @@
136
150
  trigger: 'axis',
137
151
  axisPointer: {
138
152
  type: 'line',
153
+ z: 0,
139
154
  lineStyle: {
140
155
  type: 'solid'
141
156
  }
142
157
  },
158
+ extraCssText: `box-shadow: ${boxShadow.menu}`,
143
159
  formatter: createTooltipFormatter({
144
160
  yAxisName,
145
161
  yAxisUnit: props.yAxisUnit ?? undefined,
@@ -169,8 +185,8 @@
169
185
  // Determine visual style based on focusTargetKey
170
186
  const isTargeted = focusTargetKey && group.key === focusTargetKey;
171
187
  const isBlurred = focusTargetKey && !isTargeted;
172
- const lineOpacity = isBlurred ? 0.3 : 1;
173
- const areaOpacityBase = isBlurred ? 0.1 : 0.4; // Lower base opacity for blurred area
188
+ const lineOpacity = isBlurred ? 0.25 : 1;
189
+ const areaOpacityBase = isBlurred ? 0.1 : 0.2; // Lower base opacity for blurred area
174
190
  const areaOpacityEnd = 0;
175
191
 
176
192
  return {
@@ -21,7 +21,7 @@ export const createTooltipFormatter = (config) => {
21
21
  const firstParam = paramArray[0];
22
22
  const categoryName = firstParam.name ?? ''; // X-axis value (category)
23
23
  const unit = config.yAxisUnit ?? '';
24
- let tooltipContent = `<div style="font-weight:bold; margin-bottom: 5px;">${categoryName}</div>`;
24
+ let tooltipContent = `<div class="font-medium mb-1 text-primary">${categoryName}</div>`;
25
25
  const originalSeriesCount = paramArray.length;
26
26
  let seriesToShow = paramArray;
27
27
  if (originalSeriesCount > maxSeriesToShow) {
@@ -39,9 +39,9 @@ export const createTooltipFormatter = (config) => {
39
39
  }
40
40
  // Fallback color if still unresolved (should ideally not happen if configured correctly)
41
41
  color = color || textColor['icon-blue'];
42
- const marker = `<span style="display:inline-block;margin-right:5px;border-radius:2px;width:8px;height:8px;background-color:${color}; vertical-align: baseline;"></span>`;
43
- const valueString = `<span style="font-weight:500;">${toFixedLocaleString(value, 2)} ${unit}</span>`;
44
- tooltipContent += `<div>${marker}${seriesName}: ${valueString}</div>`;
42
+ const marker = `<span class="size-2 rounded-sm" style="background-color:${color}"></span>`;
43
+ const valueString = `<span class="text-primary">${toFixedLocaleString(value, 2)} ${unit}</span>`;
44
+ tooltipContent += `<div class="flex items-center justify-between gap-4"><span class="flex items-center gap-2">${marker}${seriesName}</span><span>${valueString}</span></div>`;
45
45
  });
46
46
  if (originalSeriesCount > maxSeriesToShow) {
47
47
  const remainingCount = originalSeriesCount - maxSeriesToShow;
@@ -88,7 +88,7 @@
88
88
  cursor: not-allowed
89
89
  }
90
90
  .disabled:disabled {
91
- background-color: #12192a0d;
91
+ background-color: #12192a0A;
92
92
  --tw-text-opacity: 1;
93
93
  color: rgb(136 140 148 / var(--tw-text-opacity, 1))
94
94
  }
@@ -141,7 +141,7 @@
141
141
  background-color: rgb(71 65 193 / var(--tw-bg-opacity, 1))
142
142
  }
143
143
  .color-secondary {
144
- background-color: #12192a0d;
144
+ background-color: #12192a0A;
145
145
  --tw-text-opacity: 1;
146
146
  color: rgb(18 25 42 / var(--tw-text-opacity, 1))
147
147
  }
@@ -154,7 +154,7 @@
154
154
  color: rgb(89 94 106 / var(--tw-text-opacity, 1))
155
155
  }
156
156
  .color-transparent:hover {
157
- background-color: #12192a0d;
157
+ background-color: #12192a0A;
158
158
  --tw-text-opacity: 1;
159
159
  color: rgb(18 25 42 / var(--tw-text-opacity, 1))
160
160
  }
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from 'svelte';
3
3
  import { Button } from '../button';
4
- import { textColor } from '../../tokens';
4
+ import { textColor, borderColor } from '../../tokens';
5
5
  import { Icon } from '../icons';
6
6
  import IconButton from '../icon-button/IconButton.svelte';
7
7
  import Divider from '../divider/Divider.svelte';
@@ -14,6 +14,7 @@
14
14
  const MIN_ZOOM = 1;
15
15
  const ZOOM_STEP = 0.001;
16
16
  const MARKER_COLOR = textColor['icon-blue'] || '#2563eb';
17
+ const MARKER_BORDER_COLOR = borderColor['interactive'] || '#12192A1A';
17
18
  const TEXT_COLOR = textColor['primary-inverse'];
18
19
  const DRAG_THRESHOLD = 5;
19
20
 
@@ -219,6 +220,9 @@
219
220
  circle.setAttribute('r', String(adjustedMarkerSize));
220
221
  circle.setAttribute('fill', MARKER_COLOR);
221
222
  circle.setAttribute('class', 'drop-shadow-sm');
223
+ circle.setAttribute('opacity', '0.75');
224
+ circle.setAttribute('stroke', MARKER_BORDER_COLOR);
225
+ circle.setAttribute('stroke-width', String(1 / transform.scale));
222
226
  group.appendChild(circle);
223
227
 
224
228
  const text = document.createElementNS(svgns, 'text');
@@ -3,7 +3,7 @@
3
3
  import type { ItemProps, ItemSlotProps } from '../types';
4
4
 
5
5
  import type { Snippet } from 'svelte';
6
- import Check from 'phosphor-svelte/lib/Check';
6
+ import Icon from '../../icons/Icon.svelte';
7
7
 
8
8
  interface Props extends ItemProps {
9
9
  children?: Snippet<[ItemSlotProps]>;
@@ -13,10 +13,10 @@
13
13
  let { class: className = '', children, ...restProps }: Props = $props();
14
14
 
15
15
  const baseClasses = `
16
- relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none
17
- focus:bg-accent focus:text-accent-foreground
16
+ relative flex w-full h-auto gap-2 cursor-default select-none items-center justify-between rounded-lg p-3 text-sm outline-none
17
+ focus:bg-neutral focus:text-accent-foreground
18
18
  data-[disabled]:pointer-events-none data-[disabled]:opacity-50
19
- data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground
19
+ data-[highlighted]:bg-neutral data-[highlighted]:text-accent-foreground
20
20
  `;
21
21
  </script>
22
22
 
@@ -33,9 +33,7 @@
33
33
  >
34
34
  {/if}
35
35
  {#if params.selected}
36
- <span class="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
37
- <Check class="h-4 w-4" />
38
- </span>
36
+ <Icon iconName="Check" color="accent" />
39
37
  {/if}
40
38
  {/snippet}
41
39
  </SelectPrimitive.Item>
@@ -23,7 +23,7 @@
23
23
  }: Props = $props();
24
24
 
25
25
  const baseClasses =
26
- 'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50';
26
+ 'flex h-10 w-full items-center justify-between rounded-lg border border-input bg-surface p-2 text-sm placeholder:text-tertiary focus:outline-none hover:border-hover focus:border-accent disabled:cursor-not-allowed disabled:opacity-50 transition-colors shadow-input';
27
27
  </script>
28
28
 
29
29
  <SelectPrimitive.Trigger
@@ -43,6 +43,6 @@
43
43
  {#if TriggerIcon}
44
44
  {@render TriggerIcon()}
45
45
  {:else}
46
- <Icon iconName="CaretDown" class="ml-2 h-4 w-4 shrink-0 opacity-50" />
46
+ <Icon iconName="CaretDown" color="secondary" class="mx-1 shrink-0" />
47
47
  {/if}
48
48
  </SelectPrimitive.Trigger>
@@ -78,7 +78,7 @@
78
78
  border-radius: 9999px;
79
79
  border-width: 1px;
80
80
  border-color: #12192a14;
81
- background-color: #12192a0d;
81
+ background-color: #12192a0A;
82
82
  }
83
83
 
84
84
  .thumb-overlay {
@@ -114,7 +114,7 @@
114
114
  </Tooltip>
115
115
  {/if}
116
116
  </p>
117
- <div class="flex h-10 w-full items-center gap-1">
117
+ <div class="flex h-8 w-full items-center gap-1">
118
118
  {#if value !== null}
119
119
  {#if isEditing}
120
120
  <div class="flex-1">
@@ -83,7 +83,7 @@
83
83
  }
84
84
 
85
85
  .badge-neutral {
86
- background-color: #12192a0d
86
+ background-color: #12192a0A
87
87
  }
88
88
 
89
89
  .badge-neutral:hover {
@@ -92,7 +92,7 @@
92
92
  content: '';
93
93
  position: absolute;
94
94
  width: 1px;
95
- background-color: #12192a0d;
95
+ background-color: #12192a0A;
96
96
  left: calc(0.5rem + 1.5rem / 2 - 1px / 2);
97
97
  top: 2.25rem;
98
98
  height: 2.25rem;
@@ -19,7 +19,7 @@
19
19
  | 'accent'
20
20
  | 'success'
21
21
  | 'warning';
22
- size?: 'sm' | 'md';
22
+ size?: 'xs' | 'sm' | 'md';
23
23
  tooltip?: string;
24
24
  onclick?: (event: MouseEvent) => void;
25
25
  class?: string;
@@ -35,6 +35,7 @@
35
35
  }: Props = $props();
36
36
 
37
37
  const sizes = {
38
+ xs: 'h-5 text-xs p-1',
38
39
  sm: 'h-6 text-xs p-1.5',
39
40
  md: 'h-7 text-sm p-2'
40
41
  };
@@ -2,7 +2,7 @@ import type { Snippet } from 'svelte';
2
2
  interface Props {
3
3
  children: Snippet;
4
4
  variant?: 'default' | 'outline' | 'transparent' | 'default-inverse' | 'orange' | 'sky' | 'pink' | 'lime' | 'lilac' | 'pear' | 'blue' | 'accent' | 'success' | 'warning';
5
- size?: 'sm' | 'md';
5
+ size?: 'xs' | 'sm' | 'md';
6
6
  tooltip?: string;
7
7
  onclick?: (event: MouseEvent) => void;
8
8
  class?: string;
@@ -366,6 +366,8 @@ declare const config: {
366
366
  danger: string;
367
367
  'static-inverse': string;
368
368
  'interactive-inverse': string;
369
+ white: string;
370
+ axis: string;
369
371
  };
370
372
  textColor: {
371
373
  'icon-primary': string;
package/dist/tokens.d.ts CHANGED
@@ -259,6 +259,8 @@ export declare const borderColor: {
259
259
  danger: string;
260
260
  'static-inverse': string;
261
261
  'interactive-inverse': string;
262
+ white: string;
263
+ axis: string;
262
264
  };
263
265
  export declare const textColor: {
264
266
  'icon-primary': string;
@@ -418,6 +420,21 @@ export declare const backgroundColor: {
418
420
  'pear-inverse': string;
419
421
  'pear-inverse-hover': string;
420
422
  };
423
+ export declare const chartColor: {
424
+ accent: string;
425
+ blue: string;
426
+ orange: string;
427
+ sky: string;
428
+ pink: string;
429
+ plum: string;
430
+ lilac: string;
431
+ lime: string;
432
+ pear: string;
433
+ green: string;
434
+ yellow: string;
435
+ red: string;
436
+ gray: string;
437
+ };
421
438
  export declare const outlineColor: {
422
439
  'dark-static': string;
423
440
  'dark-input': string;
@@ -697,6 +714,8 @@ export declare const tokens: {
697
714
  danger: string;
698
715
  'static-inverse': string;
699
716
  'interactive-inverse': string;
717
+ white: string;
718
+ axis: string;
700
719
  };
701
720
  textColor: {
702
721
  'icon-primary': string;
@@ -873,4 +892,19 @@ export declare const tokens: {
873
892
  hover: string;
874
893
  focus: string;
875
894
  };
895
+ chartColor: {
896
+ accent: string;
897
+ blue: string;
898
+ orange: string;
899
+ sky: string;
900
+ pink: string;
901
+ plum: string;
902
+ lilac: string;
903
+ lime: string;
904
+ pear: string;
905
+ green: string;
906
+ yellow: string;
907
+ red: string;
908
+ gray: string;
909
+ };
876
910
  };
package/dist/tokens.js CHANGED
@@ -14,7 +14,7 @@ export const colors = {
14
14
  },
15
15
  midnight: {
16
16
  default: '#12192a',
17
- 5: '#12192a0d',
17
+ 5: '#12192a0A',
18
18
  8: '#12192a14',
19
19
  10: '#12192A1A',
20
20
  15: '#12192A26',
@@ -185,7 +185,9 @@ const lightBorderColor = {
185
185
  focus: colors.periwinkle[5].default,
186
186
  danger: colors.red[5].default,
187
187
  'static-inverse': colors.base.white[10],
188
- 'interactive-inverse': colors.base.white[15]
188
+ 'interactive-inverse': colors.base.white[15],
189
+ white: colors.base.white.default,
190
+ axis: colors.gray[3]
189
191
  };
190
192
  const lightOutlineColor = {
191
193
  static: colors.base.midnight[8],
@@ -255,6 +257,21 @@ const lightBackgroundColor = {
255
257
  'pear-inverse': colors.pear[5].default,
256
258
  'pear-inverse-hover': colors.pear[6]
257
259
  };
260
+ const lightChartColor = {
261
+ accent: colors.periwinkle[5].default,
262
+ blue: colors.blue[5].default,
263
+ orange: colors.orange[5].default,
264
+ sky: colors.sky[5].default,
265
+ pink: colors.pink[5].default,
266
+ plum: colors.plum[5].default,
267
+ lilac: colors.lilac[5].default,
268
+ lime: colors.lime[5].default,
269
+ pear: colors.pear[5].default,
270
+ green: colors.green[5].default,
271
+ yellow: colors.yellow[5].default,
272
+ red: colors.red[5].default,
273
+ gray: colors.gray[5]
274
+ };
258
275
  const darkTextColor = {
259
276
  'dark-primary': colors.base.white.default,
260
277
  'dark-secondary': colors.gray[3],
@@ -367,6 +384,9 @@ export const backgroundColor = {
367
384
  ...lightBackgroundColor,
368
385
  ...darkBackgroundColor
369
386
  };
387
+ export const chartColor = {
388
+ ...lightChartColor
389
+ };
370
390
  export const outlineColor = {
371
391
  ...lightOutlineColor,
372
392
  ...darkOutlineColor
@@ -374,7 +394,7 @@ export const outlineColor = {
374
394
  export const boxShadow = {
375
395
  input: `0 1px 4px 0 ${colors.shadow[4]}`,
376
396
  container: `0 2px 16px 0 ${colors.shadow[2]}`,
377
- menu: `0 4px 20px 0 ${colors.shadow[6]}, 0 0 0 0.5px ${colors.shadow[8]}`
397
+ menu: `0 4px 20px 0 ${colors.shadow[6]}, 0 0 0 1px ${colors.shadow[8]}`
378
398
  };
379
399
  export const tokens = {
380
400
  colors,
@@ -382,5 +402,6 @@ export const tokens = {
382
402
  textColor,
383
403
  backgroundColor,
384
404
  boxShadow,
385
- outlineColor
405
+ outlineColor,
406
+ chartColor
386
407
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reshape-biotech/design-system",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build",