h2o-library 1.5.0 → 1.5.2
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/index.d.ts +1 -0
- package/dist/components/src/chart-heatmap.d.ts +4 -1
- package/dist/components/src/chart-line.d.ts +1 -0
- package/dist/components/src/chart.d.ts +29 -0
- package/dist/components/src/table.d.ts +5 -3
- package/dist/css/index.css +1 -1
- package/dist/css/src/chart.css +76 -0
- package/dist/css/src/charts.css +15 -0
- package/dist/css/src/index.css +1 -0
- package/dist/css/src/table.css +7 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/src/chart-heatmap.d.ts +4 -1
- package/dist/esm/components/src/chart-line.d.ts +1 -0
- package/dist/esm/components/src/chart.d.ts +29 -0
- package/dist/esm/components/src/table.d.ts +5 -3
- package/dist/esm/css/index.css +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,5 +11,8 @@ export interface HeatmapData {
|
|
|
11
11
|
export interface HeatmapChartProps {
|
|
12
12
|
data: HeatmapData;
|
|
13
13
|
showPercentage?: boolean;
|
|
14
|
+
height?: string | number;
|
|
15
|
+
showValue?: boolean;
|
|
16
|
+
showPercentageInTooltip?: boolean;
|
|
14
17
|
}
|
|
15
|
-
export declare const HeatmapChart: ({ data, showPercentage, }: HeatmapChartProps) => React.JSX.Element;
|
|
18
|
+
export declare const HeatmapChart: ({ data, showPercentage, height, showValue, showPercentageInTooltip, }: HeatmapChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BarChartDataPoint } from "./chart-bar";
|
|
3
|
+
import { LineChartDataPoint } from "./chart-line";
|
|
4
|
+
import { PieChartDataPoint } from "./chart-pie";
|
|
5
|
+
import { HeatmapData } from "./chart-heatmap";
|
|
6
|
+
export type ChartKPI = {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string | number;
|
|
9
|
+
};
|
|
10
|
+
type BaseChartData = {
|
|
11
|
+
bar: BarChartDataPoint[];
|
|
12
|
+
line: LineChartDataPoint[];
|
|
13
|
+
pie: PieChartDataPoint[];
|
|
14
|
+
heatmap: HeatmapData;
|
|
15
|
+
};
|
|
16
|
+
export type ChartType = keyof BaseChartData;
|
|
17
|
+
interface BaseChartProps {
|
|
18
|
+
type: ChartType;
|
|
19
|
+
title?: string;
|
|
20
|
+
tooltip?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
kpis?: ChartKPI[];
|
|
23
|
+
height?: number;
|
|
24
|
+
}
|
|
25
|
+
type ChartProps<T extends ChartType> = BaseChartProps & {
|
|
26
|
+
data: BaseChartData[T];
|
|
27
|
+
};
|
|
28
|
+
export declare const Chart: <T extends keyof BaseChartData>({ type, title, tooltip, description, kpis, data, height, }: ChartProps<T>) => React.JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -19,7 +19,6 @@ export interface TableProps<T extends Record<string, any>> {
|
|
|
19
19
|
sortKey?: string;
|
|
20
20
|
sortDirection?: SortDirection;
|
|
21
21
|
columnsEditable?: boolean;
|
|
22
|
-
onSort?: (key: string, direction: SortDirection) => void;
|
|
23
22
|
currentPage?: number;
|
|
24
23
|
totalPages?: number;
|
|
25
24
|
perPage?: number;
|
|
@@ -27,11 +26,14 @@ export interface TableProps<T extends Record<string, any>> {
|
|
|
27
26
|
label: string;
|
|
28
27
|
value: string;
|
|
29
28
|
}[];
|
|
29
|
+
onSort?: (key: string, direction: SortDirection) => void;
|
|
30
30
|
onPageChange?: (page: number) => void;
|
|
31
31
|
onPerPageChange?: (perPage: string) => void;
|
|
32
|
+
onVisibleColumnsChange?: (keys: string[]) => void;
|
|
32
33
|
maxHeight?: string;
|
|
33
34
|
visibleColumns?: string[];
|
|
34
|
-
onVisibleColumnsChange?: (keys: string[]) => void;
|
|
35
35
|
maxVisibleColumns?: number;
|
|
36
|
+
defaultVisibleColumns?: string[];
|
|
37
|
+
pinnedColumns?: string[];
|
|
36
38
|
}
|
|
37
|
-
export declare function Table<T extends Record<string, any>>({ columns, data, isLoading, className, rowHeight, sortKey, sortDirection, onSort, currentPage, totalPages, perPage, perPageOptions, onPageChange, onPerPageChange, maxHeight, columnsEditable, containerClassName, visibleColumns, onVisibleColumnsChange, maxVisibleColumns, }: TableProps<T>): React.JSX.Element;
|
|
39
|
+
export declare function Table<T extends Record<string, any>>({ columns, data, isLoading, className, rowHeight, sortKey, sortDirection, onSort, currentPage, totalPages, perPage, perPageOptions, onPageChange, onPerPageChange, maxHeight, columnsEditable, containerClassName, visibleColumns, onVisibleColumnsChange, maxVisibleColumns, defaultVisibleColumns, pinnedColumns, }: TableProps<T>): React.JSX.Element;
|
package/dist/css/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/date-range-picker.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/compact-multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";@import "./src/month-calendar.css";@import "./src/loader.css";@import "./src/message.css";@import "./src/multi-menu.css";@import "./src/charts.css";@import "./src/legend.css";
|
|
1
|
+
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/date-range-picker.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/compact-multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";@import "./src/month-calendar.css";@import "./src/loader.css";@import "./src/message.css";@import "./src/multi-menu.css";@import "./src/charts.css";@import "./src/chart.css";@import "./src/legend.css";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.chart-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 1.5rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.chart-header {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 1.5rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.chart-title-container {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 0.5rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.chart-title {
|
|
21
|
+
margin: 0;
|
|
22
|
+
font-size: 1.5rem;
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
/* color: hsl(var(--muted-200)); */
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.chart-info-icon {
|
|
28
|
+
color: hsl(var(--muted));
|
|
29
|
+
cursor: help;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.chart-metadata {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
gap: 1rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.chart-kpis {
|
|
39
|
+
display: flex;
|
|
40
|
+
gap: 2rem;
|
|
41
|
+
flex-wrap: wrap;
|
|
42
|
+
padding-bottom: 0.5rem;
|
|
43
|
+
border-bottom: 1px solid hsl(var(--muted-50));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.chart-kpi {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: 0.25rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.chart-kpi-label {
|
|
53
|
+
font-size: 0.875rem;
|
|
54
|
+
color: hsl(var(--muted-200));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.chart-kpi-value {
|
|
58
|
+
font-size: 1.5rem;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
/* color: hsl(var(--muted-200)); */
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.chart-legend {
|
|
64
|
+
padding-top: 0.5rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.chart-header-content {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: 0.25rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.chart-description {
|
|
74
|
+
font-size: 1rem;
|
|
75
|
+
color: hsl(var(--muted-200));
|
|
76
|
+
}
|
package/dist/css/src/charts.css
CHANGED
|
@@ -50,11 +50,14 @@
|
|
|
50
50
|
.heatmap-container {
|
|
51
51
|
width: 100%;
|
|
52
52
|
padding: 1rem;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
.heatmap-grid {
|
|
56
58
|
display: grid;
|
|
57
59
|
gap: 0.5rem;
|
|
60
|
+
flex-grow: 1;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
.heatmap-col-header {
|
|
@@ -79,6 +82,11 @@
|
|
|
79
82
|
.heatmap-cell {
|
|
80
83
|
padding: 0.75rem;
|
|
81
84
|
overflow: hidden;
|
|
85
|
+
height: 100%;
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
.heatmap-cell-content {
|
|
@@ -99,3 +107,10 @@
|
|
|
99
107
|
width: 0.75rem;
|
|
100
108
|
height: 0.75rem;
|
|
101
109
|
}
|
|
110
|
+
|
|
111
|
+
.heatmap-cell-tooltip-content {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
gap: 0.25rem;
|
|
115
|
+
font-size: 0.75rem;
|
|
116
|
+
}
|
package/dist/css/src/index.css
CHANGED
package/dist/css/src/table.css
CHANGED
|
@@ -136,6 +136,13 @@
|
|
|
136
136
|
padding: 1rem;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
.edit-columns-header {
|
|
140
|
+
display: flex;
|
|
141
|
+
justify-content: space-between;
|
|
142
|
+
align-items: center;
|
|
143
|
+
margin-bottom: 0.5rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
139
146
|
.edit-columns-title {
|
|
140
147
|
font-size: 1rem;
|
|
141
148
|
font-weight: 600;
|
|
@@ -11,5 +11,8 @@ export interface HeatmapData {
|
|
|
11
11
|
export interface HeatmapChartProps {
|
|
12
12
|
data: HeatmapData;
|
|
13
13
|
showPercentage?: boolean;
|
|
14
|
+
height?: string | number;
|
|
15
|
+
showValue?: boolean;
|
|
16
|
+
showPercentageInTooltip?: boolean;
|
|
14
17
|
}
|
|
15
|
-
export declare const HeatmapChart: ({ data, showPercentage, }: HeatmapChartProps) => React.JSX.Element;
|
|
18
|
+
export declare const HeatmapChart: ({ data, showPercentage, height, showValue, showPercentageInTooltip, }: HeatmapChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BarChartDataPoint } from "./chart-bar";
|
|
3
|
+
import { LineChartDataPoint } from "./chart-line";
|
|
4
|
+
import { PieChartDataPoint } from "./chart-pie";
|
|
5
|
+
import { HeatmapData } from "./chart-heatmap";
|
|
6
|
+
export type ChartKPI = {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string | number;
|
|
9
|
+
};
|
|
10
|
+
type BaseChartData = {
|
|
11
|
+
bar: BarChartDataPoint[];
|
|
12
|
+
line: LineChartDataPoint[];
|
|
13
|
+
pie: PieChartDataPoint[];
|
|
14
|
+
heatmap: HeatmapData;
|
|
15
|
+
};
|
|
16
|
+
export type ChartType = keyof BaseChartData;
|
|
17
|
+
interface BaseChartProps {
|
|
18
|
+
type: ChartType;
|
|
19
|
+
title?: string;
|
|
20
|
+
tooltip?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
kpis?: ChartKPI[];
|
|
23
|
+
height?: number;
|
|
24
|
+
}
|
|
25
|
+
type ChartProps<T extends ChartType> = BaseChartProps & {
|
|
26
|
+
data: BaseChartData[T];
|
|
27
|
+
};
|
|
28
|
+
export declare const Chart: <T extends keyof BaseChartData>({ type, title, tooltip, description, kpis, data, height, }: ChartProps<T>) => React.JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -19,7 +19,6 @@ export interface TableProps<T extends Record<string, any>> {
|
|
|
19
19
|
sortKey?: string;
|
|
20
20
|
sortDirection?: SortDirection;
|
|
21
21
|
columnsEditable?: boolean;
|
|
22
|
-
onSort?: (key: string, direction: SortDirection) => void;
|
|
23
22
|
currentPage?: number;
|
|
24
23
|
totalPages?: number;
|
|
25
24
|
perPage?: number;
|
|
@@ -27,11 +26,14 @@ export interface TableProps<T extends Record<string, any>> {
|
|
|
27
26
|
label: string;
|
|
28
27
|
value: string;
|
|
29
28
|
}[];
|
|
29
|
+
onSort?: (key: string, direction: SortDirection) => void;
|
|
30
30
|
onPageChange?: (page: number) => void;
|
|
31
31
|
onPerPageChange?: (perPage: string) => void;
|
|
32
|
+
onVisibleColumnsChange?: (keys: string[]) => void;
|
|
32
33
|
maxHeight?: string;
|
|
33
34
|
visibleColumns?: string[];
|
|
34
|
-
onVisibleColumnsChange?: (keys: string[]) => void;
|
|
35
35
|
maxVisibleColumns?: number;
|
|
36
|
+
defaultVisibleColumns?: string[];
|
|
37
|
+
pinnedColumns?: string[];
|
|
36
38
|
}
|
|
37
|
-
export declare function Table<T extends Record<string, any>>({ columns, data, isLoading, className, rowHeight, sortKey, sortDirection, onSort, currentPage, totalPages, perPage, perPageOptions, onPageChange, onPerPageChange, maxHeight, columnsEditable, containerClassName, visibleColumns, onVisibleColumnsChange, maxVisibleColumns, }: TableProps<T>): React.JSX.Element;
|
|
39
|
+
export declare function Table<T extends Record<string, any>>({ columns, data, isLoading, className, rowHeight, sortKey, sortDirection, onSort, currentPage, totalPages, perPage, perPageOptions, onPageChange, onPerPageChange, maxHeight, columnsEditable, containerClassName, visibleColumns, onVisibleColumnsChange, maxVisibleColumns, defaultVisibleColumns, pinnedColumns, }: TableProps<T>): React.JSX.Element;
|
package/dist/esm/css/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/date-range-picker.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/compact-multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";@import "./src/month-calendar.css";@import "./src/loader.css";@import "./src/message.css";@import "./src/multi-menu.css";@import "./src/charts.css";@import "./src/legend.css";
|
|
1
|
+
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/date-range-picker.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/compact-multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";@import "./src/month-calendar.css";@import "./src/loader.css";@import "./src/message.css";@import "./src/multi-menu.css";@import "./src/charts.css";@import "./src/chart.css";@import "./src/legend.css";
|