h2o-library 1.3.9 → 1.5.0

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 (34) hide show
  1. package/dist/components/index.d.ts +2 -0
  2. package/dist/components/src/calendar.d.ts +7 -1
  3. package/dist/components/src/chart-bar.d.ts +2 -1
  4. package/dist/components/src/chart-heatmap.d.ts +3 -2
  5. package/dist/components/src/date-range-picker.d.ts +10 -0
  6. package/dist/components/src/dropdown.d.ts +1 -0
  7. package/dist/components/src/legend.d.ts +17 -0
  8. package/dist/components/src/table.d.ts +5 -1
  9. package/dist/components/src/tooltip.d.ts +12 -3
  10. package/dist/css/index.css +1 -1
  11. package/dist/css/src/calendar.css +7 -0
  12. package/dist/css/src/charts.css +7 -0
  13. package/dist/css/src/date-range-picker.css +73 -0
  14. package/dist/css/src/index.css +2 -0
  15. package/dist/css/src/legend.css +34 -0
  16. package/dist/css/src/table.css +89 -0
  17. package/dist/css/src/tooltip.css +20 -21
  18. package/dist/esm/components/index.d.ts +2 -0
  19. package/dist/esm/components/src/calendar.d.ts +7 -1
  20. package/dist/esm/components/src/chart-bar.d.ts +2 -1
  21. package/dist/esm/components/src/chart-heatmap.d.ts +3 -2
  22. package/dist/esm/components/src/date-range-picker.d.ts +10 -0
  23. package/dist/esm/components/src/dropdown.d.ts +1 -0
  24. package/dist/esm/components/src/legend.d.ts +17 -0
  25. package/dist/esm/components/src/table.d.ts +5 -1
  26. package/dist/esm/components/src/tooltip.d.ts +12 -3
  27. package/dist/esm/css/index.css +1 -1
  28. package/dist/esm/index.js +4 -4
  29. package/dist/esm/index.js.map +1 -1
  30. package/dist/esm/types/src/icon.d.ts +1 -1
  31. package/dist/index.cjs.js +4 -4
  32. package/dist/index.cjs.js.map +1 -1
  33. package/dist/types/src/icon.d.ts +1 -1
  34. package/package.json +1 -1
@@ -33,3 +33,5 @@ export * from "./src/chart-line";
33
33
  export * from "./src/chart-bar";
34
34
  export * from "./src/chart-pie";
35
35
  export * from "./src/chart-stat";
36
+ export * from "./src/date-range-picker";
37
+ export * from "./src/legend";
@@ -8,6 +8,12 @@ interface CalendarProps {
8
8
  maxDate?: Date;
9
9
  forceWeek?: boolean;
10
10
  disabledDates?: Date[];
11
+ month?: Date;
12
+ hideHeader?: boolean;
13
+ hideOutsideDays?: boolean;
14
+ hoverDate?: Date | null;
15
+ onDayMouseEnter?: (date: Date) => void;
16
+ onDayMouseLeave?: () => void;
11
17
  }
12
- declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, disabledDates, }: CalendarProps) => JSX.Element | null;
18
+ declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, disabledDates, month, hideHeader, hideOutsideDays, hoverDate: externalHoverDate, onDayMouseEnter, onDayMouseLeave, }: CalendarProps) => JSX.Element | null;
13
19
  export { Calendar };
@@ -12,8 +12,9 @@ export interface BarChartProps {
12
12
  data: BarChartDataPoint[];
13
13
  bars: BarProps[];
14
14
  layout?: 'single' | 'grouped' | 'stacked';
15
+ orientation?: 'vertical' | 'horizontal';
15
16
  showGrid?: boolean;
16
17
  showLegend?: boolean;
17
18
  height?: number;
18
19
  }
19
- export declare const BarChart: ({ data, bars, layout, showGrid, showLegend, height, }: BarChartProps) => React.JSX.Element;
20
+ export declare const BarChart: ({ data, bars, layout, orientation, showGrid, showLegend, height, }: BarChartProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export interface HeatmapDataPoint {
3
3
  value: number;
4
4
  percentage: number;
@@ -10,5 +10,6 @@ export interface HeatmapData {
10
10
  }
11
11
  export interface HeatmapChartProps {
12
12
  data: HeatmapData;
13
+ showPercentage?: boolean;
13
14
  }
14
- export declare const HeatmapChart: ({ data }: HeatmapChartProps) => React.JSX.Element;
15
+ export declare const HeatmapChart: ({ data, showPercentage, }: HeatmapChartProps) => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ interface DateRangePickerProps {
3
+ value?: [Date | null, Date | null];
4
+ onChange?: (value: [Date | null, Date | null]) => void;
5
+ minDate?: Date;
6
+ maxDate?: Date;
7
+ disabledDates?: Date[];
8
+ }
9
+ export declare const DateRangePicker: ({ value, onChange, ...calendarProps }: DateRangePickerProps) => React.JSX.Element;
10
+ export {};
@@ -16,5 +16,6 @@ export interface DropdownProps extends Omit<React.ButtonHTMLAttributes<HTMLButto
16
16
  value?: string;
17
17
  onChange?: (value: string) => void;
18
18
  enableSearch?: boolean;
19
+ direction?: "top" | "bottom" | "auto";
19
20
  }
20
21
  export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export type LegendStyle = 'line' | 'dashed-line' | 'rectangle' | 'circle';
3
+ export type LegendItem = {
4
+ label: string;
5
+ color: string;
6
+ onClick?: () => void;
7
+ style?: LegendStyle;
8
+ };
9
+ export type LegendProps = {
10
+ items: LegendItem[];
11
+ itemStyle?: LegendStyle;
12
+ className?: string;
13
+ itemClassName?: string;
14
+ labelClassName?: string;
15
+ colorClassName?: string;
16
+ };
17
+ export declare const Legend: ({ items, itemStyle, className, itemClassName, labelClassName, colorClassName, }: LegendProps) => React.JSX.Element;
@@ -18,6 +18,7 @@ export interface TableProps<T extends Record<string, any>> {
18
18
  rowHeight?: string;
19
19
  sortKey?: string;
20
20
  sortDirection?: SortDirection;
21
+ columnsEditable?: boolean;
21
22
  onSort?: (key: string, direction: SortDirection) => void;
22
23
  currentPage?: number;
23
24
  totalPages?: number;
@@ -29,5 +30,8 @@ export interface TableProps<T extends Record<string, any>> {
29
30
  onPageChange?: (page: number) => void;
30
31
  onPerPageChange?: (perPage: string) => void;
31
32
  maxHeight?: string;
33
+ visibleColumns?: string[];
34
+ onVisibleColumnsChange?: (keys: string[]) => void;
35
+ maxVisibleColumns?: number;
32
36
  }
33
- export declare function Table<T extends Record<string, any>>({ columns, data, isLoading, className, rowHeight, sortKey, sortDirection, onSort, currentPage, totalPages, perPage, perPageOptions, onPageChange, onPerPageChange, maxHeight, containerClassName, }: TableProps<T>): React.JSX.Element;
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;
@@ -1,9 +1,18 @@
1
1
  import React from "react";
2
2
  import { TooltipPosition } from "../../types";
3
- export interface TooltipProps {
4
- text: string;
3
+ type BaseProps = {
5
4
  position?: TooltipPosition;
6
5
  className?: string;
7
6
  children: React.ReactNode;
8
- }
7
+ };
8
+ type TextTooltip = BaseProps & {
9
+ text: string;
10
+ content?: never;
11
+ };
12
+ type ContentTooltip = BaseProps & {
13
+ content: React.ReactNode;
14
+ text?: never;
15
+ };
16
+ export type TooltipProps = TextTooltip | ContentTooltip;
9
17
  export declare const Tooltip: React.FC<TooltipProps>;
18
+ export {};
@@ -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/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";
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";
@@ -8,6 +8,13 @@
8
8
  padding: 0 1rem;
9
9
  }
10
10
 
11
+ .calendar-container--no-header {
12
+ border: none;
13
+ box-shadow: none;
14
+ padding: 0;
15
+ max-width: none;
16
+ }
17
+
11
18
  .calendar-header {
12
19
  display: flex;
13
20
  align-items: center;
@@ -61,6 +61,9 @@
61
61
  padding: 0.5rem;
62
62
  font-weight: 500;
63
63
  text-align: center;
64
+ overflow: hidden;
65
+ text-overflow: ellipsis;
66
+ white-space: nowrap;
64
67
  }
65
68
 
66
69
  .heatmap-row-header {
@@ -68,10 +71,14 @@
68
71
  font-weight: 500;
69
72
  display: flex;
70
73
  align-items: center;
74
+ overflow: hidden;
75
+ text-overflow: ellipsis;
76
+ white-space: nowrap;
71
77
  }
72
78
 
73
79
  .heatmap-cell {
74
80
  padding: 0.75rem;
81
+ overflow: hidden;
75
82
  }
76
83
 
77
84
  .heatmap-cell-content {
@@ -0,0 +1,73 @@
1
+ .date-range-picker {
2
+ display: flex;
3
+ background-color: hsl(var(--background));
4
+ border-radius: 0.5rem;
5
+ box-shadow: var(--primary-shadow);
6
+ border: 1px solid hsl(var(--primary-muted));
7
+ font-family: sans-serif;
8
+ }
9
+
10
+ .date-range-picker__presets {
11
+ padding: 1rem;
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: 0.5rem;
15
+ border-right: 1px solid hsl(var(--muted) / 50%);
16
+ width: 14rem;
17
+ font-size: 0.875rem;
18
+ }
19
+
20
+ .date-range-picker__presets .radio-label {
21
+ width: 100%;
22
+ }
23
+
24
+ .date-range-picker__main {
25
+ padding: 1rem;
26
+ flex-grow: 1;
27
+ }
28
+
29
+ .date-range-picker__display {
30
+ font-size: 1rem;
31
+ font-weight: 500;
32
+ margin-bottom: 1rem;
33
+ padding: 0 0.5rem;
34
+ }
35
+
36
+ .date-range-picker__calendars {
37
+ display: grid;
38
+ grid-template-columns: 1fr 1fr;
39
+ gap: 1.5rem;
40
+ grid-template-areas:
41
+ "header1 header2"
42
+ "cal1 cal2";
43
+ }
44
+
45
+ .date-range-picker__calendars .calendar-container {
46
+ border: none;
47
+ box-shadow: none;
48
+ padding: 0;
49
+ max-width: none;
50
+ }
51
+
52
+ .date-range-picker__header {
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: space-between;
56
+ padding: 0 0.5rem;
57
+ }
58
+
59
+ .date-range-picker__header:nth-of-type(1) {
60
+ grid-area: header1;
61
+ }
62
+
63
+ .date-range-picker__header:nth-of-type(2) {
64
+ grid-area: header2;
65
+ }
66
+
67
+ .date-range-picker__calendars .calendar-container:nth-of-type(1) {
68
+ grid-area: cal1;
69
+ }
70
+
71
+ .date-range-picker__calendars .calendar-container:nth-of-type(2) {
72
+ grid-area: cal2;
73
+ }
@@ -37,6 +37,7 @@
37
37
  @import "./src/calendar.css";
38
38
  @import "./src/checkbox.css";
39
39
  @import "./src/content-switch.css";
40
+ @import "./src/date-range-picker.css";
40
41
  @import "./src/dropdown.css";
41
42
  @import "./src/input.css";
42
43
  @import "./src/modal.css";
@@ -60,3 +61,4 @@
60
61
  @import "./src/message.css";
61
62
  @import "./src/multi-menu.css";
62
63
  @import "./src/charts.css";
64
+ @import "./src/legend.css";
@@ -0,0 +1,34 @@
1
+ .legend {
2
+ display: flex;
3
+ gap: 1rem;
4
+ }
5
+
6
+ .legend-item {
7
+ display: flex;
8
+ align-items: center;
9
+ gap: 0.5rem;
10
+ }
11
+
12
+ .legend-item--clickable {
13
+ cursor: pointer;
14
+ }
15
+
16
+ .legend-swatch {
17
+ width: 1.5rem;
18
+ height: 1rem;
19
+ }
20
+
21
+ .legend-swatch--line {
22
+ height: 0.25rem;
23
+ }
24
+
25
+ .legend-swatch--dashed-line {
26
+ height: 0.25rem;
27
+ background-color: transparent;
28
+ border-bottom: 2px dashed;
29
+ }
30
+
31
+ .legend-swatch--circle {
32
+ width: 1rem;
33
+ border-radius: 9999px;
34
+ }
@@ -1,3 +1,4 @@
1
+
1
2
  .table-container {
2
3
  width: 100%;
3
4
  display: flex;
@@ -6,6 +7,7 @@
6
7
  border-radius: var(--radius-md);
7
8
  background-color: hsl(var(--background));
8
9
  overflow: hidden;
10
+ position: relative;
9
11
  }
10
12
 
11
13
  .table-wrapper {
@@ -113,4 +115,91 @@
113
115
  .table-pagination {
114
116
  padding: 0.8rem;
115
117
  border-top: 1px solid hsl(var(--muted) / 60%);
118
+ }
119
+
120
+ .table-header-actions {
121
+ position: absolute;
122
+ top: 0;
123
+ right: 0;
124
+ z-index: 100;
125
+ padding: 0.4rem;
126
+ }
127
+
128
+ /* Edit Columns Popover */
129
+ .edit-columns-popover {
130
+ width: 300px;
131
+ background-color: hsl(var(--background));
132
+ border: 1px solid hsl(var(--muted) / 60%);
133
+ border-radius: var(--radius-md);
134
+ display: flex;
135
+ flex-direction: column;
136
+ padding: 1rem;
137
+ }
138
+
139
+ .edit-columns-title {
140
+ font-size: 1rem;
141
+ font-weight: 600;
142
+ }
143
+
144
+ .edit-columns-content {
145
+ display: flex;
146
+ flex-direction: column;
147
+ gap: 0.5rem;
148
+ }
149
+
150
+ .edit-columns-subtitle {
151
+ font-size: 0.75rem;
152
+ color: hsl(var(--muted-200));
153
+ margin-bottom: 0.5rem;
154
+ }
155
+
156
+ .edit-columns-list {
157
+ display: flex;
158
+ flex-direction: column;
159
+ gap: 0.5rem;
160
+ max-height: 200px;
161
+ overflow-y: auto;
162
+ }
163
+
164
+ .edit-columns-item {
165
+ display: flex;
166
+ align-items: center;
167
+ gap: 0.75rem;
168
+ padding: 0.5rem;
169
+ border-radius: var(--radius-md);
170
+ border: 1px solid hsl(var(--muted) / 60%);
171
+ background-color: hsl(var(--background));
172
+ user-select: none;
173
+ }
174
+
175
+ .edit-columns-item-content label {
176
+ font-size: 14px;
177
+ }
178
+
179
+ .edit-columns-item.dragging {
180
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
181
+ border-color: hsl(var(--primary));
182
+ }
183
+
184
+ .drag-handle {
185
+ cursor: grab;
186
+ color: hsl(var(--muted-foreground));
187
+ }
188
+
189
+ .edit-columns-item.dragging .drag-handle {
190
+ cursor: grabbing;
191
+ }
192
+
193
+ .edit-columns-actions {
194
+ display: flex;
195
+ justify-content: flex-end;
196
+ gap: 0.5rem;
197
+ padding-top: 0.4rem;
198
+ }
199
+
200
+ .edit-columns-item-content {
201
+ display: flex;
202
+ align-items: center;
203
+ justify-content: space-between;
204
+ width: 100%;
116
205
  }
@@ -3,8 +3,7 @@
3
3
  display: inline-block;
4
4
  }
5
5
 
6
- .tooltip-container::before {
7
- content: attr(data-tooltip);
6
+ .tooltip-box {
8
7
  position: absolute;
9
8
  background-color: hsl(var(--muted));
10
9
  color: black;
@@ -20,7 +19,7 @@
20
19
  }
21
20
 
22
21
  /* Arrow */
23
- .tooltip-container::after {
22
+ .tooltip-box::after {
24
23
  content: "";
25
24
  position: absolute;
26
25
  border: 8px solid transparent;
@@ -32,72 +31,72 @@
32
31
  }
33
32
 
34
33
  /* Show on hover */
35
- .tooltip-container:hover::before,
36
- .tooltip-container:hover::after {
34
+ .tooltip-container:hover .tooltip-box,
35
+ .tooltip-container:hover .tooltip-box::after {
37
36
  opacity: 1;
38
37
  visibility: visible;
39
38
  }
40
39
 
41
40
  /* Position: Top */
42
- .tooltip-container[data-position="top"]::before {
41
+ .tooltip-container[data-position="top"] .tooltip-box {
43
42
  bottom: 100%;
44
43
  left: 50%;
45
44
  transform: translateX(-50%);
46
45
  margin-bottom: 8px;
47
46
  }
48
47
 
49
- .tooltip-container[data-position="top"]::after {
50
- bottom: 100%;
48
+ .tooltip-container[data-position="top"] .tooltip-box::after {
49
+ top: 100%;
51
50
  left: 50%;
52
51
  transform: translateX(-50%);
53
52
  border-top-color: hsl(var(--muted));
54
- margin-bottom: -8px;
53
+ /* margin-top: -8px; */
55
54
  }
56
55
 
57
56
  /* Position: Bottom */
58
- .tooltip-container[data-position="bottom"]::before {
57
+ .tooltip-container[data-position="bottom"] .tooltip-box {
59
58
  top: 100%;
60
59
  left: 50%;
61
60
  transform: translateX(-50%);
62
61
  margin-top: 8px;
63
62
  }
64
63
 
65
- .tooltip-container[data-position="bottom"]::after {
66
- top: 100%;
64
+ .tooltip-container[data-position="bottom"] .tooltip-box::after {
65
+ bottom: 100%;
67
66
  left: 50%;
68
67
  transform: translateX(-50%);
69
68
  border-bottom-color: hsl(var(--muted));
70
- margin-top: -8px;
69
+ /* margin-bottom: -8px; */
71
70
  }
72
71
 
73
72
  /* Position: Left */
74
- .tooltip-container[data-position="left"]::before {
73
+ .tooltip-container[data-position="left"] .tooltip-box {
75
74
  right: 100%;
76
75
  top: 50%;
77
76
  transform: translateY(-50%);
78
77
  margin-right: 8px;
79
78
  }
80
79
 
81
- .tooltip-container[data-position="left"]::after {
82
- right: 100%;
80
+ .tooltip-container[data-position="left"] .tooltip-box::after {
81
+ left: 100%;
83
82
  top: 50%;
84
83
  transform: translateY(-50%);
85
84
  border-left-color: hsl(var(--muted));
86
- margin-right: -8px;
85
+ /* margin-left: -8px; */
87
86
  }
88
87
 
89
88
  /* Position: Right */
90
- .tooltip-container[data-position="right"]::before {
89
+ .tooltip-container[data-position="right"] .tooltip-box {
91
90
  left: 100%;
92
91
  top: 50%;
93
92
  transform: translateY(-50%);
94
93
  margin-left: 8px;
95
94
  }
96
95
 
97
- .tooltip-container[data-position="right"]::after {
98
- left: 100%;
96
+ .tooltip-container[data-position="right"] .tooltip-box::after {
97
+ right: 100%;
99
98
  top: 50%;
100
99
  transform: translateY(-50%);
101
100
  border-right-color: hsl(var(--muted));
102
- margin-left: -8px;
101
+ /* margin-right: -8px; */
103
102
  }
@@ -33,3 +33,5 @@ export * from "./src/chart-line";
33
33
  export * from "./src/chart-bar";
34
34
  export * from "./src/chart-pie";
35
35
  export * from "./src/chart-stat";
36
+ export * from "./src/date-range-picker";
37
+ export * from "./src/legend";
@@ -8,6 +8,12 @@ interface CalendarProps {
8
8
  maxDate?: Date;
9
9
  forceWeek?: boolean;
10
10
  disabledDates?: Date[];
11
+ month?: Date;
12
+ hideHeader?: boolean;
13
+ hideOutsideDays?: boolean;
14
+ hoverDate?: Date | null;
15
+ onDayMouseEnter?: (date: Date) => void;
16
+ onDayMouseLeave?: () => void;
11
17
  }
12
- declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, disabledDates, }: CalendarProps) => JSX.Element | null;
18
+ declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, disabledDates, month, hideHeader, hideOutsideDays, hoverDate: externalHoverDate, onDayMouseEnter, onDayMouseLeave, }: CalendarProps) => JSX.Element | null;
13
19
  export { Calendar };
@@ -12,8 +12,9 @@ export interface BarChartProps {
12
12
  data: BarChartDataPoint[];
13
13
  bars: BarProps[];
14
14
  layout?: 'single' | 'grouped' | 'stacked';
15
+ orientation?: 'vertical' | 'horizontal';
15
16
  showGrid?: boolean;
16
17
  showLegend?: boolean;
17
18
  height?: number;
18
19
  }
19
- export declare const BarChart: ({ data, bars, layout, showGrid, showLegend, height, }: BarChartProps) => React.JSX.Element;
20
+ export declare const BarChart: ({ data, bars, layout, orientation, showGrid, showLegend, height, }: BarChartProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export interface HeatmapDataPoint {
3
3
  value: number;
4
4
  percentage: number;
@@ -10,5 +10,6 @@ export interface HeatmapData {
10
10
  }
11
11
  export interface HeatmapChartProps {
12
12
  data: HeatmapData;
13
+ showPercentage?: boolean;
13
14
  }
14
- export declare const HeatmapChart: ({ data }: HeatmapChartProps) => React.JSX.Element;
15
+ export declare const HeatmapChart: ({ data, showPercentage, }: HeatmapChartProps) => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ interface DateRangePickerProps {
3
+ value?: [Date | null, Date | null];
4
+ onChange?: (value: [Date | null, Date | null]) => void;
5
+ minDate?: Date;
6
+ maxDate?: Date;
7
+ disabledDates?: Date[];
8
+ }
9
+ export declare const DateRangePicker: ({ value, onChange, ...calendarProps }: DateRangePickerProps) => React.JSX.Element;
10
+ export {};
@@ -16,5 +16,6 @@ export interface DropdownProps extends Omit<React.ButtonHTMLAttributes<HTMLButto
16
16
  value?: string;
17
17
  onChange?: (value: string) => void;
18
18
  enableSearch?: boolean;
19
+ direction?: "top" | "bottom" | "auto";
19
20
  }
20
21
  export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export type LegendStyle = 'line' | 'dashed-line' | 'rectangle' | 'circle';
3
+ export type LegendItem = {
4
+ label: string;
5
+ color: string;
6
+ onClick?: () => void;
7
+ style?: LegendStyle;
8
+ };
9
+ export type LegendProps = {
10
+ items: LegendItem[];
11
+ itemStyle?: LegendStyle;
12
+ className?: string;
13
+ itemClassName?: string;
14
+ labelClassName?: string;
15
+ colorClassName?: string;
16
+ };
17
+ export declare const Legend: ({ items, itemStyle, className, itemClassName, labelClassName, colorClassName, }: LegendProps) => React.JSX.Element;
@@ -18,6 +18,7 @@ export interface TableProps<T extends Record<string, any>> {
18
18
  rowHeight?: string;
19
19
  sortKey?: string;
20
20
  sortDirection?: SortDirection;
21
+ columnsEditable?: boolean;
21
22
  onSort?: (key: string, direction: SortDirection) => void;
22
23
  currentPage?: number;
23
24
  totalPages?: number;
@@ -29,5 +30,8 @@ export interface TableProps<T extends Record<string, any>> {
29
30
  onPageChange?: (page: number) => void;
30
31
  onPerPageChange?: (perPage: string) => void;
31
32
  maxHeight?: string;
33
+ visibleColumns?: string[];
34
+ onVisibleColumnsChange?: (keys: string[]) => void;
35
+ maxVisibleColumns?: number;
32
36
  }
33
- export declare function Table<T extends Record<string, any>>({ columns, data, isLoading, className, rowHeight, sortKey, sortDirection, onSort, currentPage, totalPages, perPage, perPageOptions, onPageChange, onPerPageChange, maxHeight, containerClassName, }: TableProps<T>): React.JSX.Element;
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;
@@ -1,9 +1,18 @@
1
1
  import React from "react";
2
2
  import { TooltipPosition } from "../../types";
3
- export interface TooltipProps {
4
- text: string;
3
+ type BaseProps = {
5
4
  position?: TooltipPosition;
6
5
  className?: string;
7
6
  children: React.ReactNode;
8
- }
7
+ };
8
+ type TextTooltip = BaseProps & {
9
+ text: string;
10
+ content?: never;
11
+ };
12
+ type ContentTooltip = BaseProps & {
13
+ content: React.ReactNode;
14
+ text?: never;
15
+ };
16
+ export type TooltipProps = TextTooltip | ContentTooltip;
9
17
  export declare const Tooltip: React.FC<TooltipProps>;
18
+ export {};
@@ -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/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";
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";