h2o-library 1.3.6 → 1.3.8

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.
@@ -0,0 +1,190 @@
1
+ /* src/styles/src/multi-menu.css */
2
+ .multi-menu-container {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 0.375rem;
6
+ width: 100%;
7
+ }
8
+
9
+ .multi-menu-label {
10
+ font-size: 0.875rem;
11
+ font-weight: 500;
12
+ color: hsl(var(--foreground));
13
+ }
14
+
15
+ .multi-menu-trigger-wrapper {
16
+ position: relative;
17
+ display: flex;
18
+ width: 100%;
19
+ border-radius: 0.375rem;
20
+ border: 1.5px solid hsl(var(--muted));
21
+ background: hsl(var(--background));
22
+ transition: border-color 0.2s, background-color 0.2s;
23
+ }
24
+
25
+ .multi-menu-trigger-wrapper:not(.multi-menu-disabled):not(.multi-menu-error):hover {
26
+ border-color: hsl(var(--primary));
27
+ }
28
+
29
+ .multi-menu-trigger-wrapper.multi-menu-focused:not(.multi-menu-disabled):not(
30
+ .multi-menu-error
31
+ ) {
32
+ border-color: hsl(var(--primary-300));
33
+ }
34
+
35
+ .multi-menu-trigger-wrapper.multi-menu-error {
36
+ border-color: hsl(var(--destructive));
37
+ background-color: hsl(var(--destructive-bg) / 0.3);
38
+ }
39
+
40
+ .multi-menu-trigger-wrapper.multi-menu-error:hover,
41
+ .multi-menu-trigger-wrapper.multi-menu-error.multi-menu-focused {
42
+ border-color: hsl(var(--destructive));
43
+ }
44
+
45
+ .multi-menu-trigger-wrapper.multi-menu-disabled {
46
+ opacity: 0.5;
47
+ cursor: not-allowed;
48
+ }
49
+
50
+ .multi-menu-trigger {
51
+ width: 100%;
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: space-between;
55
+ border: none;
56
+ outline: none;
57
+ color: hsl(var(--foreground));
58
+ padding: 0 0.5rem 0 0.8rem;
59
+ cursor: pointer;
60
+ font-family: inherit;
61
+ background: transparent;
62
+ }
63
+
64
+ .multi-menu-trigger:disabled {
65
+ cursor: not-allowed;
66
+ }
67
+
68
+ .multi-menu-trigger-value {
69
+ flex: 1;
70
+ text-align: left;
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+ white-space: nowrap;
74
+ }
75
+
76
+ .multi-menu-chevron {
77
+ flex-shrink: 0;
78
+ margin-left: 0.5rem;
79
+ color: hsl(var(--muted));
80
+ transition: transform 0.2s ease;
81
+ }
82
+
83
+ .multi-menu-chevron-open {
84
+ transform: rotate(180deg);
85
+ }
86
+
87
+ .multi-menu-trigger-sm { height: 2rem; font-size: 0.875rem; }
88
+ .multi-menu-trigger-md { height: 2.5rem; font-size: 1rem; }
89
+ .multi-menu-trigger-lg { height: 3rem; font-size: 1.125rem; }
90
+
91
+ /* Menu panels */
92
+ .multi-menu-panels {
93
+ position: absolute;
94
+ top: 100%;
95
+ left: 0;
96
+ margin-top: 0.25rem;
97
+ display: flex;
98
+ align-items: flex-start;
99
+ z-index: 50;
100
+ }
101
+
102
+ .multi-menu-panel {
103
+ padding: 0.25rem;
104
+ border-radius: 0.375rem;
105
+ background-color: hsl(var(--background));
106
+ border: 1px solid hsl(var(--muted));
107
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
108
+ max-height: 15rem;
109
+ overflow-y: auto;
110
+ width: 12rem;
111
+ animation: dropdownSlideDown 0.1s ease-out;
112
+ }
113
+
114
+ @keyframes dropdownSlideDown {
115
+ from {
116
+ opacity: 0;
117
+ transform: translateY(-0.25rem);
118
+ }
119
+ to {
120
+ opacity: 1;
121
+ transform: translateY(0);
122
+ }
123
+ }
124
+
125
+ .multi-menu-panel + .multi-menu-panel {
126
+ margin-left: 0.25rem;
127
+ }
128
+
129
+ .multi-menu-option {
130
+ width: 100%;
131
+ display: flex;
132
+ align-items: center;
133
+ justify-content: space-between;
134
+ padding: 0.5rem 0.75rem;
135
+ border: none;
136
+ background: none;
137
+ color: hsl(var(--foreground));
138
+ font-size: inherit;
139
+ text-align: left;
140
+ cursor: pointer;
141
+ border-radius: 0.25rem;
142
+ transition: all 0.2s;
143
+ white-space: nowrap;
144
+ }
145
+
146
+ .multi-menu-option:hover:not(.multi-menu-option-disabled) {
147
+ background-color: hsl(var(--primary-disabled));
148
+ }
149
+
150
+ .multi-menu-option-active:not(.multi-menu-option-disabled) {
151
+ background-color: hsl(var(--primary-disabled));
152
+ }
153
+
154
+ .multi-menu-option-disabled {
155
+ opacity: 0.5;
156
+ cursor: not-allowed;
157
+ }
158
+
159
+ .multi-menu-option-label {
160
+ flex-grow: 1;
161
+ overflow: hidden;
162
+ text-overflow: ellipsis;
163
+ margin-right: 1rem;
164
+ }
165
+
166
+ .multi-menu-option-chevron {
167
+ flex-shrink: 0;
168
+ color: hsl(var(--muted-200));
169
+ }
170
+
171
+ .multi-menu-note {
172
+ font-size: 0.875rem;
173
+ color: hsl(var(--muted-200));
174
+ transition: color 0.2s;
175
+ }
176
+
177
+ .multi-menu-trigger-wrapper:not(.multi-menu-disabled):not(.multi-menu-error):hover
178
+ + .multi-menu-note {
179
+ color: hsl(var(--primary));
180
+ }
181
+
182
+ .multi-menu-trigger-wrapper.multi-menu-focused:not(.multi-menu-disabled):not(.multi-menu-error)
183
+ + .multi-menu-note {
184
+ color: hsl(var(--primary));
185
+ }
186
+
187
+ .multi-menu-error-message {
188
+ font-size: 0.875rem;
189
+ color: hsl(var(--destructive));
190
+ }
@@ -26,3 +26,9 @@ export * from "./src/calendar";
26
26
  export * from "./src/month-calendar";
27
27
  export * from "./src/loader";
28
28
  export * from "./src/message";
29
+ export * from "./src/multi-menu";
30
+ export * from "./src/chart-line";
31
+ export * from "./src/chart-bar";
32
+ export * from "./src/chart-pie";
33
+ export * from "./src/chart-stat";
34
+ export * from "./src/compact-multi-select";
@@ -0,0 +1,16 @@
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
+ }
10
+ export interface BarChartProps {
11
+ data: BarChartDataPoint[];
12
+ bars: BarProps[];
13
+ showGrid?: boolean;
14
+ showLegend?: boolean;
15
+ }
16
+ export declare const BarChart: ({ data, bars, showGrid, showLegend, }: BarChartProps) => React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export interface LineChartDataPoint {
3
+ name: string;
4
+ [key: string]: number | string;
5
+ }
6
+ export interface LineProps {
7
+ dataKey: string;
8
+ stroke: string;
9
+ isDashed?: 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
+ }
19
+ export declare const LineChart: ({ data, lines, showGrid, showLegend, showGradient, }: LineChartProps) => React.JSX.Element;
@@ -0,0 +1,11 @@
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
+ showLegend?: boolean;
10
+ }
11
+ export declare const PieChart: ({ data, showLegend }: 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>>;
@@ -15,5 +15,6 @@ export interface DropdownProps extends Omit<React.ButtonHTMLAttributes<HTMLButto
15
15
  placeholder?: string;
16
16
  value?: string;
17
17
  onChange?: (value: string) => void;
18
+ enableSearch?: boolean;
18
19
  }
19
20
  export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ export interface MultiMenuItem {
3
+ label: string;
4
+ value: string;
5
+ onClick?: () => void;
6
+ disabled?: boolean;
7
+ subItems?: MultiMenuItem[];
8
+ }
9
+ export interface MultiMenuProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
10
+ size?: "sm" | "md" | "lg";
11
+ label?: string;
12
+ note?: string;
13
+ error?: string;
14
+ containerClassName?: string;
15
+ items: MultiMenuItem[];
16
+ placeholder?: string;
17
+ }
18
+ export declare const MultiMenu: React.ForwardRefExoticComponent<MultiMenuProps & React.RefAttributes<HTMLButtonElement>>;
@@ -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";
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";