@makolabs/ripple 0.0.1-dev.27 → 0.0.1-dev.29
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/charts/Chart.svelte +4 -17
- package/dist/elements/alert/Alert.svelte +5 -1
- package/dist/index.d.ts +17 -2
- package/package.json +1 -1
package/dist/charts/Chart.svelte
CHANGED
|
@@ -99,13 +99,6 @@
|
|
|
99
99
|
// Check if we have a pie/donut chart
|
|
100
100
|
const hasPieChart = $derived(series.some((s) => s.type === 'pie'));
|
|
101
101
|
|
|
102
|
-
// Check if we should show axis lines based on config or auto-detect from series type
|
|
103
|
-
const shouldShowAxisLines = $derived.by(() => {
|
|
104
|
-
if (config.showAxisLines !== undefined) return config.showAxisLines;
|
|
105
|
-
// Auto-detect: show for bar charts, hide for line charts
|
|
106
|
-
return series.some((s) => s.type === 'bar' || s.type === 'horizontal-bar');
|
|
107
|
-
});
|
|
108
|
-
|
|
109
102
|
let chartContainer: HTMLDivElement;
|
|
110
103
|
// @ts-expect-error - ECharts types are not available
|
|
111
104
|
let chart: echarts.ECharts;
|
|
@@ -440,11 +433,8 @@
|
|
|
440
433
|
splitLine: {
|
|
441
434
|
show: grid.vertical || false
|
|
442
435
|
},
|
|
443
|
-
axisLine: {
|
|
444
|
-
show:
|
|
445
|
-
lineStyle: {
|
|
446
|
-
color: 'rgba(0, 0, 0, 0.1)'
|
|
447
|
-
}
|
|
436
|
+
axisLine: xAxis.axisLine || {
|
|
437
|
+
show: false
|
|
448
438
|
}
|
|
449
439
|
},
|
|
450
440
|
|
|
@@ -457,11 +447,8 @@
|
|
|
457
447
|
position: axis.position || (index === 0 ? 'left' : 'right'),
|
|
458
448
|
min: axis.min,
|
|
459
449
|
max: axis.max,
|
|
460
|
-
axisLine: {
|
|
461
|
-
show:
|
|
462
|
-
lineStyle: {
|
|
463
|
-
color: 'rgba(0, 0, 0, 0.1)'
|
|
464
|
-
}
|
|
450
|
+
axisLine: axis.axisLine || {
|
|
451
|
+
show: false
|
|
465
452
|
},
|
|
466
453
|
axisLabel: {
|
|
467
454
|
// @ts-expect-error - ECharts types are not available
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
message,
|
|
9
9
|
color = Color.DEFAULT,
|
|
10
10
|
onclose,
|
|
11
|
+
footer,
|
|
11
12
|
class: className = ''
|
|
12
13
|
}: AlertProps = $props();
|
|
13
14
|
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
{#if onclose}
|
|
37
38
|
<button
|
|
38
39
|
type="button"
|
|
39
|
-
class="flex-shrink-0 cursor-pointer rounded-md p-1
|
|
40
|
+
class="hover:bg-default-200/20 flex-shrink-0 cursor-pointer rounded-md p-1"
|
|
40
41
|
onclick={handleClose}
|
|
41
42
|
aria-label="Close alert"
|
|
42
43
|
>
|
|
@@ -50,4 +51,7 @@
|
|
|
50
51
|
</button>
|
|
51
52
|
{/if}
|
|
52
53
|
</div>
|
|
54
|
+
{#if footer}
|
|
55
|
+
{@render footer()}
|
|
56
|
+
{/if}
|
|
53
57
|
</div>
|
package/dist/index.d.ts
CHANGED
|
@@ -150,6 +150,7 @@ export type AlertProps = {
|
|
|
150
150
|
color?: VariantColors;
|
|
151
151
|
class?: string;
|
|
152
152
|
onclose?: () => void;
|
|
153
|
+
footer?: Snippet;
|
|
153
154
|
};
|
|
154
155
|
export type StatsCardProps = {
|
|
155
156
|
label?: string;
|
|
@@ -354,7 +355,14 @@ export type XAxisConfig<T> = {
|
|
|
354
355
|
rotate?: number;
|
|
355
356
|
interval?: number | 'auto' | Function;
|
|
356
357
|
};
|
|
357
|
-
|
|
358
|
+
axisLine?: {
|
|
359
|
+
show?: boolean;
|
|
360
|
+
lineStyle?: {
|
|
361
|
+
color?: string;
|
|
362
|
+
width?: number;
|
|
363
|
+
type?: 'solid' | 'dashed' | 'dotted';
|
|
364
|
+
};
|
|
365
|
+
};
|
|
358
366
|
};
|
|
359
367
|
export type YAxisConfig<T> = {
|
|
360
368
|
dataKey: keyof T;
|
|
@@ -364,7 +372,14 @@ export type YAxisConfig<T> = {
|
|
|
364
372
|
position?: 'left' | 'right';
|
|
365
373
|
min?: number;
|
|
366
374
|
max?: number;
|
|
367
|
-
|
|
375
|
+
axisLine?: {
|
|
376
|
+
show?: boolean;
|
|
377
|
+
lineStyle?: {
|
|
378
|
+
color?: string;
|
|
379
|
+
width?: number;
|
|
380
|
+
type?: 'solid' | 'dashed' | 'dotted';
|
|
381
|
+
};
|
|
382
|
+
};
|
|
368
383
|
};
|
|
369
384
|
export interface SeriesConfig<T> {
|
|
370
385
|
dataKey: keyof T;
|