h2o-library 1.3.7 → 1.3.9
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 +6 -0
- package/dist/components/src/chart-bar.d.ts +19 -0
- package/dist/components/src/chart-heatmap.d.ts +14 -0
- package/dist/components/src/chart-line.d.ts +20 -0
- package/dist/components/src/chart-pie.d.ts +14 -0
- package/dist/components/src/chart-stat.d.ts +20 -0
- package/dist/components/src/compact-multi-select.d.ts +25 -0
- package/dist/css/index.css +1 -1
- package/dist/css/src/accordion.css +0 -2
- package/dist/css/src/charts.css +94 -0
- package/dist/css/src/compact-multi-select.css +295 -0
- package/dist/css/src/index.css +2 -0
- package/dist/esm/components/index.d.ts +6 -0
- package/dist/esm/components/src/chart-bar.d.ts +19 -0
- package/dist/esm/components/src/chart-heatmap.d.ts +14 -0
- package/dist/esm/components/src/chart-line.d.ts +20 -0
- package/dist/esm/components/src/chart-pie.d.ts +14 -0
- package/dist/esm/components/src/chart-stat.d.ts +20 -0
- package/dist/esm/components/src/compact-multi-select.d.ts +25 -0
- package/dist/esm/css/index.css +1 -1
- package/dist/esm/index.js +23 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.cjs.js +23 -1
- package/dist/index.cjs.js.map +1 -1
- package/package.json +2 -1
|
@@ -27,3 +27,9 @@ export * from "./src/month-calendar";
|
|
|
27
27
|
export * from "./src/loader";
|
|
28
28
|
export * from "./src/message";
|
|
29
29
|
export * from "./src/multi-menu";
|
|
30
|
+
export * from "./src/chart-heatmap";
|
|
31
|
+
export * from "./src/compact-multi-select";
|
|
32
|
+
export * from "./src/chart-line";
|
|
33
|
+
export * from "./src/chart-bar";
|
|
34
|
+
export * from "./src/chart-pie";
|
|
35
|
+
export * from "./src/chart-stat";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BarChartDataPoint {
|
|
3
|
+
name: string;
|
|
4
|
+
[key: string]: number | string;
|
|
5
|
+
}
|
|
6
|
+
export interface BarProps {
|
|
7
|
+
dataKey: string;
|
|
8
|
+
fill: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BarChartProps {
|
|
12
|
+
data: BarChartDataPoint[];
|
|
13
|
+
bars: BarProps[];
|
|
14
|
+
layout?: 'single' | 'grouped' | 'stacked';
|
|
15
|
+
showGrid?: boolean;
|
|
16
|
+
showLegend?: boolean;
|
|
17
|
+
height?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const BarChart: ({ data, bars, layout, showGrid, showLegend, height, }: BarChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface HeatmapDataPoint {
|
|
3
|
+
value: number;
|
|
4
|
+
percentage: number;
|
|
5
|
+
}
|
|
6
|
+
export interface HeatmapData {
|
|
7
|
+
rows: string[];
|
|
8
|
+
columns: string[];
|
|
9
|
+
data: HeatmapDataPoint[][];
|
|
10
|
+
}
|
|
11
|
+
export interface HeatmapChartProps {
|
|
12
|
+
data: HeatmapData;
|
|
13
|
+
}
|
|
14
|
+
export declare const HeatmapChart: ({ data }: HeatmapChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LineChartDataPoint {
|
|
3
|
+
name: string;
|
|
4
|
+
[key: string]: number | string | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface LineProps {
|
|
7
|
+
dataKey: string;
|
|
8
|
+
stroke: string;
|
|
9
|
+
dashed?: boolean;
|
|
10
|
+
unit?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LineChartProps {
|
|
13
|
+
data: LineChartDataPoint[];
|
|
14
|
+
lines: LineProps[];
|
|
15
|
+
showGrid?: boolean;
|
|
16
|
+
showLegend?: boolean;
|
|
17
|
+
showGradient?: boolean;
|
|
18
|
+
height?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const LineChart: ({ data, lines, showGrid, showLegend, showGradient, height, }: LineChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PieChartDataPoint {
|
|
3
|
+
name: string;
|
|
4
|
+
value: number;
|
|
5
|
+
color: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PieChartProps {
|
|
8
|
+
data: PieChartDataPoint[];
|
|
9
|
+
variant?: 'pie' | 'donut';
|
|
10
|
+
showLegend?: boolean;
|
|
11
|
+
height?: number;
|
|
12
|
+
showLabels?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const PieChart: ({ data, variant, showLegend, height, showLabels, }: PieChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface StatChartDataPoint {
|
|
3
|
+
name: string;
|
|
4
|
+
value: number;
|
|
5
|
+
total: number;
|
|
6
|
+
}
|
|
7
|
+
export interface StatChartBarProps {
|
|
8
|
+
dataKey: string;
|
|
9
|
+
fill: string;
|
|
10
|
+
stackId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface StatChartProps {
|
|
13
|
+
data: StatChartDataPoint[];
|
|
14
|
+
compareData?: StatChartDataPoint[];
|
|
15
|
+
barColor?: string;
|
|
16
|
+
totalBarColor?: string;
|
|
17
|
+
unit?: string;
|
|
18
|
+
showDifference?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const StatChart: ({ data, compareData, barColor, totalBarColor, unit, showDifference, }: StatChartProps) => React.JSX.Element | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TooltipPosition } from "../../types";
|
|
3
|
+
export interface CompactMultiSelectOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface CompactMultiSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "value"> {
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
label?: string;
|
|
11
|
+
showClear?: boolean;
|
|
12
|
+
note?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
containerClassName?: string;
|
|
15
|
+
options: CompactMultiSelectOption[];
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
value?: CompactMultiSelectOption[];
|
|
18
|
+
onChange?: (value: CompactMultiSelectOption[]) => void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
enableSearch?: boolean;
|
|
21
|
+
maxSelections?: number;
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
tooltipPosition?: TooltipPosition;
|
|
24
|
+
}
|
|
25
|
+
export declare const CompactMultiSelect: React.ForwardRefExoticComponent<CompactMultiSelectProps & React.RefAttributes<HTMLDivElement>>;
|
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/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/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";
|
|
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/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";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
.bar-chart-container {
|
|
2
|
+
font-family: sans-serif;
|
|
3
|
+
text-align: center;
|
|
4
|
+
padding: 2rem 2rem 2rem 0px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.line-chart-container {
|
|
8
|
+
font-family: sans-serif;
|
|
9
|
+
text-align: center;
|
|
10
|
+
padding: 2rem 2rem 2rem 0px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pie-chart-container {
|
|
14
|
+
font-family: sans-serif;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.stat-chart-container {
|
|
19
|
+
font-family: sans-serif;
|
|
20
|
+
text-align: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.custom-chart-tooltip {
|
|
24
|
+
background-color: #262626;
|
|
25
|
+
color: white;
|
|
26
|
+
padding: 0.5rem 1rem;
|
|
27
|
+
border-radius: 0.375rem;
|
|
28
|
+
font-size: 0.875rem;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
position: relative;
|
|
31
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
32
|
+
transform: translate(-50%, calc(-100% - 16px));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.custom-chart-tooltip::after {
|
|
36
|
+
content: "";
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 100%;
|
|
39
|
+
left: 50%;
|
|
40
|
+
transform: translateX(-50%);
|
|
41
|
+
border-width: 8px;
|
|
42
|
+
border-style: solid;
|
|
43
|
+
border-color: #262626 transparent transparent transparent;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.recharts-tooltip-wrapper {
|
|
47
|
+
z-index: 1000;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.heatmap-container {
|
|
51
|
+
width: 100%;
|
|
52
|
+
padding: 1rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.heatmap-grid {
|
|
56
|
+
display: grid;
|
|
57
|
+
gap: 0.5rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.heatmap-col-header {
|
|
61
|
+
padding: 0.5rem;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
text-align: center;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.heatmap-row-header {
|
|
67
|
+
padding: 0.5rem;
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.heatmap-cell {
|
|
74
|
+
padding: 0.75rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.heatmap-cell-content {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
gap: 0.25rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.heatmap-cell-value-container {
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.heatmap-cell-percentage-container {
|
|
88
|
+
font-size: 0.75rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.heatmap-icon {
|
|
92
|
+
width: 0.75rem;
|
|
93
|
+
height: 0.75rem;
|
|
94
|
+
}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
.compact-multi-select-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.375rem;
|
|
5
|
+
width: 100%;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.compact-multi-select-header {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.compact-multi-select-label {
|
|
16
|
+
font-size: 0.875rem;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
color: hsl(var(--foreground));
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 0.2rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.compact-multi-select-clear {
|
|
25
|
+
font-size: 0.875rem;
|
|
26
|
+
color: hsl(var(--muted-200));
|
|
27
|
+
background: none;
|
|
28
|
+
border: none;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
transition: color 0.2s;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.compact-multi-select-clear:hover {
|
|
34
|
+
color: hsl(var(--primary));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.compact-multi-select-wrapper {
|
|
38
|
+
position: relative;
|
|
39
|
+
display: flex;
|
|
40
|
+
width: 100%;
|
|
41
|
+
border-radius: 0.375rem;
|
|
42
|
+
border: 1.5px solid hsl(var(--muted));
|
|
43
|
+
background: hsl(var(--background));
|
|
44
|
+
transition: border-color 0.2s, background-color 0.2s;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.compact-multi-select-wrapper:not(.compact-multi-select-disabled):not(.compact-multi-select-error):hover {
|
|
48
|
+
border-color: hsl(var(--primary));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.compact-multi-select-wrapper.compact-multi-select-focused:not(.compact-multi-select-disabled):not(
|
|
52
|
+
.compact-multi-select-error
|
|
53
|
+
) {
|
|
54
|
+
border-color: hsl(var(--primary-300));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.compact-multi-select-wrapper.compact-multi-select-error {
|
|
58
|
+
border-color: hsl(var(--destructive));
|
|
59
|
+
background-color: hsl(var(--destructive-bg) / 0.3);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.compact-multi-select-wrapper.compact-multi-select-error:hover,
|
|
63
|
+
.compact-multi-select-wrapper.compact-multi-select-error.compact-multi-select-focused {
|
|
64
|
+
border-color: hsl(var(--destructive));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.compact-multi-select-wrapper.compact-multi-select-disabled {
|
|
68
|
+
opacity: 0.5;
|
|
69
|
+
cursor: not-allowed;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.compact-multi-select {
|
|
73
|
+
width: 100%;
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: space-between;
|
|
77
|
+
border: none;
|
|
78
|
+
outline: none;
|
|
79
|
+
color: hsl(var(--foreground));
|
|
80
|
+
padding: 0.3rem 0.5rem 0.3rem 0.8rem;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
font-family: inherit;
|
|
83
|
+
min-height: 2.5rem;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.compact-multi-select:disabled {
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.compact-multi-select-content {
|
|
91
|
+
flex: 1;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-wrap: wrap;
|
|
94
|
+
gap: 0.375rem;
|
|
95
|
+
align-items: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.compact-multi-select-placeholder {
|
|
99
|
+
color: hsl(var(--muted));
|
|
100
|
+
font-size: 0.875rem;
|
|
101
|
+
font-weight: 400;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.compact-multi-select-chevron {
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
margin-left: 0.5rem;
|
|
107
|
+
color: hsl(var(--muted));
|
|
108
|
+
transition: transform 0.2s ease;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.compact-multi-select-chevron-open {
|
|
112
|
+
transform: rotate(180deg);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Sizing */
|
|
116
|
+
.compact-multi-select-sm {
|
|
117
|
+
min-height: 2rem;
|
|
118
|
+
font-size: 0.875rem;
|
|
119
|
+
padding-top: 0.25rem;
|
|
120
|
+
padding-bottom: 0.25rem;
|
|
121
|
+
}
|
|
122
|
+
.compact-multi-select-md {
|
|
123
|
+
min-height: 2.5rem;
|
|
124
|
+
font-size: 1rem;
|
|
125
|
+
}
|
|
126
|
+
.compact-multi-select-lg {
|
|
127
|
+
min-height: 3rem;
|
|
128
|
+
font-size: 1.125rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Tags for selected items */
|
|
132
|
+
.compact-multi-select-tag {
|
|
133
|
+
display: inline-flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 0.25rem;
|
|
136
|
+
background-color: hsl(var(--primary-muted));
|
|
137
|
+
color: hsl(var(--primary-400));
|
|
138
|
+
padding: 0.125rem 0.5rem;
|
|
139
|
+
border-radius: var(--radius-sm);
|
|
140
|
+
font-size: 0.875rem;
|
|
141
|
+
font-weight: 500;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.compact-multi-select-tag-remove {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
background: none;
|
|
149
|
+
border: none;
|
|
150
|
+
padding: 0;
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
color: hsl(var(--primary-400));
|
|
153
|
+
opacity: 0.7;
|
|
154
|
+
transition: opacity 0.2s;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.compact-multi-select-tag-remove:hover {
|
|
158
|
+
opacity: 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Dropdown Menu */
|
|
162
|
+
.compact-multi-select-menu {
|
|
163
|
+
z-index: 50;
|
|
164
|
+
margin-top: 0.25rem;
|
|
165
|
+
margin-bottom: 0.25rem;
|
|
166
|
+
border-radius: 0.375rem;
|
|
167
|
+
background-color: hsl(var(--background));
|
|
168
|
+
border: 1px solid hsl(var(--muted));
|
|
169
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
170
|
+
max-height: 15rem;
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.compact-multi-select-search-wrapper {
|
|
176
|
+
padding: 0.5rem;
|
|
177
|
+
border-bottom: 1.5px solid hsl(var(--muted));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.compact-multi-select-options-wrapper {
|
|
181
|
+
padding: 0.25rem;
|
|
182
|
+
overflow-y: auto;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.compact-multi-select-menu-top {
|
|
186
|
+
transform-origin: bottom;
|
|
187
|
+
animation: dropdownSlideUp 0.1s ease-out;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.compact-multi-select-menu-bottom {
|
|
191
|
+
transform-origin: top;
|
|
192
|
+
animation: dropdownSlideDown 0.1s ease-out;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.compact-multi-select-no-options {
|
|
196
|
+
padding: 0.5rem 0.75rem;
|
|
197
|
+
color: hsl(var(--muted-200));
|
|
198
|
+
font-size: inherit;
|
|
199
|
+
text-align: center;
|
|
200
|
+
cursor: default;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.compact-multi-select-option {
|
|
204
|
+
width: 100%;
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
justify-content: space-between;
|
|
208
|
+
padding: 0.5rem 0.75rem;
|
|
209
|
+
border: none;
|
|
210
|
+
background: none;
|
|
211
|
+
color: hsl(var(--foreground));
|
|
212
|
+
font-size: inherit;
|
|
213
|
+
text-align: left;
|
|
214
|
+
cursor: pointer;
|
|
215
|
+
border-radius: 0.25rem;
|
|
216
|
+
transition: all 0.2s;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.compact-multi-select-option:hover:not(.compact-multi-select-option-disabled):not(
|
|
220
|
+
.compact-multi-select-option-selected
|
|
221
|
+
) {
|
|
222
|
+
background-color: hsl(var(--primary-disabled));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.compact-multi-select-option-selected {
|
|
226
|
+
background-color: hsl(var(--primary));
|
|
227
|
+
color: white;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.compact-multi-select-option-selected .icon {
|
|
231
|
+
color: white;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.compact-multi-select-option-selected:hover {
|
|
235
|
+
background-color: hsl(var(--primary-200));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.compact-multi-select-option-disabled {
|
|
239
|
+
opacity: 0.5;
|
|
240
|
+
cursor: not-allowed;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Note and Error messages */
|
|
244
|
+
.compact-multi-select-note {
|
|
245
|
+
font-size: 0.875rem;
|
|
246
|
+
color: hsl(var(--muted-200));
|
|
247
|
+
transition: color 0.2s;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.compact-multi-select-wrapper:not(.compact-multi-select-disabled):not(.compact-multi-select-error):hover
|
|
251
|
+
+ .compact-multi-select-note {
|
|
252
|
+
color: hsl(var(--primary));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.compact-multi-select-wrapper.compact-multi-select-focused:not(.compact-multi-select-disabled):not(
|
|
256
|
+
.compact-multi-select-error
|
|
257
|
+
)
|
|
258
|
+
+ .compact-multi-select-note {
|
|
259
|
+
color: hsl(var(--primary));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.compact-multi-select-error-message {
|
|
263
|
+
font-size: 0.875rem;
|
|
264
|
+
color: hsl(var(--destructive));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.compact-multi-select-info-icon {
|
|
268
|
+
color: hsl(var(--muted-200));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.compact-multi-select-info-icon:hover {
|
|
272
|
+
color: hsl(var(--primary));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@keyframes dropdownSlideDown {
|
|
276
|
+
from {
|
|
277
|
+
opacity: 0;
|
|
278
|
+
transform: translateY(-0.5rem);
|
|
279
|
+
}
|
|
280
|
+
to {
|
|
281
|
+
opacity: 1;
|
|
282
|
+
transform: translateY(0);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
@keyframes dropdownSlideUp {
|
|
287
|
+
from {
|
|
288
|
+
opacity: 0;
|
|
289
|
+
transform: translateY(0.5rem);
|
|
290
|
+
}
|
|
291
|
+
to {
|
|
292
|
+
opacity: 1;
|
|
293
|
+
transform: translateY(0);
|
|
294
|
+
}
|
|
295
|
+
}
|
package/dist/css/src/index.css
CHANGED
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
@import "./src/input.css";
|
|
42
42
|
@import "./src/modal.css";
|
|
43
43
|
@import "./src/multi-select.css";
|
|
44
|
+
@import "./src/compact-multi-select.css";
|
|
44
45
|
@import "./src/popover.css";
|
|
45
46
|
@import "./src/radio.css";
|
|
46
47
|
@import "./src/search.css";
|
|
@@ -58,3 +59,4 @@
|
|
|
58
59
|
@import "./src/loader.css";
|
|
59
60
|
@import "./src/message.css";
|
|
60
61
|
@import "./src/multi-menu.css";
|
|
62
|
+
@import "./src/charts.css";
|
|
@@ -27,3 +27,9 @@ export * from "./src/month-calendar";
|
|
|
27
27
|
export * from "./src/loader";
|
|
28
28
|
export * from "./src/message";
|
|
29
29
|
export * from "./src/multi-menu";
|
|
30
|
+
export * from "./src/chart-heatmap";
|
|
31
|
+
export * from "./src/compact-multi-select";
|
|
32
|
+
export * from "./src/chart-line";
|
|
33
|
+
export * from "./src/chart-bar";
|
|
34
|
+
export * from "./src/chart-pie";
|
|
35
|
+
export * from "./src/chart-stat";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BarChartDataPoint {
|
|
3
|
+
name: string;
|
|
4
|
+
[key: string]: number | string;
|
|
5
|
+
}
|
|
6
|
+
export interface BarProps {
|
|
7
|
+
dataKey: string;
|
|
8
|
+
fill: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BarChartProps {
|
|
12
|
+
data: BarChartDataPoint[];
|
|
13
|
+
bars: BarProps[];
|
|
14
|
+
layout?: 'single' | 'grouped' | 'stacked';
|
|
15
|
+
showGrid?: boolean;
|
|
16
|
+
showLegend?: boolean;
|
|
17
|
+
height?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const BarChart: ({ data, bars, layout, showGrid, showLegend, height, }: BarChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface HeatmapDataPoint {
|
|
3
|
+
value: number;
|
|
4
|
+
percentage: number;
|
|
5
|
+
}
|
|
6
|
+
export interface HeatmapData {
|
|
7
|
+
rows: string[];
|
|
8
|
+
columns: string[];
|
|
9
|
+
data: HeatmapDataPoint[][];
|
|
10
|
+
}
|
|
11
|
+
export interface HeatmapChartProps {
|
|
12
|
+
data: HeatmapData;
|
|
13
|
+
}
|
|
14
|
+
export declare const HeatmapChart: ({ data }: HeatmapChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LineChartDataPoint {
|
|
3
|
+
name: string;
|
|
4
|
+
[key: string]: number | string | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface LineProps {
|
|
7
|
+
dataKey: string;
|
|
8
|
+
stroke: string;
|
|
9
|
+
dashed?: boolean;
|
|
10
|
+
unit?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LineChartProps {
|
|
13
|
+
data: LineChartDataPoint[];
|
|
14
|
+
lines: LineProps[];
|
|
15
|
+
showGrid?: boolean;
|
|
16
|
+
showLegend?: boolean;
|
|
17
|
+
showGradient?: boolean;
|
|
18
|
+
height?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const LineChart: ({ data, lines, showGrid, showLegend, showGradient, height, }: LineChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PieChartDataPoint {
|
|
3
|
+
name: string;
|
|
4
|
+
value: number;
|
|
5
|
+
color: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PieChartProps {
|
|
8
|
+
data: PieChartDataPoint[];
|
|
9
|
+
variant?: 'pie' | 'donut';
|
|
10
|
+
showLegend?: boolean;
|
|
11
|
+
height?: number;
|
|
12
|
+
showLabels?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const PieChart: ({ data, variant, showLegend, height, showLabels, }: PieChartProps) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface StatChartDataPoint {
|
|
3
|
+
name: string;
|
|
4
|
+
value: number;
|
|
5
|
+
total: number;
|
|
6
|
+
}
|
|
7
|
+
export interface StatChartBarProps {
|
|
8
|
+
dataKey: string;
|
|
9
|
+
fill: string;
|
|
10
|
+
stackId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface StatChartProps {
|
|
13
|
+
data: StatChartDataPoint[];
|
|
14
|
+
compareData?: StatChartDataPoint[];
|
|
15
|
+
barColor?: string;
|
|
16
|
+
totalBarColor?: string;
|
|
17
|
+
unit?: string;
|
|
18
|
+
showDifference?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const StatChart: ({ data, compareData, barColor, totalBarColor, unit, showDifference, }: StatChartProps) => React.JSX.Element | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TooltipPosition } from "../../types";
|
|
3
|
+
export interface CompactMultiSelectOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface CompactMultiSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "value"> {
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
label?: string;
|
|
11
|
+
showClear?: boolean;
|
|
12
|
+
note?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
containerClassName?: string;
|
|
15
|
+
options: CompactMultiSelectOption[];
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
value?: CompactMultiSelectOption[];
|
|
18
|
+
onChange?: (value: CompactMultiSelectOption[]) => void;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
enableSearch?: boolean;
|
|
21
|
+
maxSelections?: number;
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
tooltipPosition?: TooltipPosition;
|
|
24
|
+
}
|
|
25
|
+
export declare const CompactMultiSelect: React.ForwardRefExoticComponent<CompactMultiSelectProps & React.RefAttributes<HTMLDivElement>>;
|
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/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/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";
|
|
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/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";
|