@hyperpackai/hyperui 0.1.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.
- package/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/components/Accordion/index.d.ts +17 -0
- package/dist/components/Accordion/index.d.ts.map +1 -0
- package/dist/components/Accordion/index.js +46 -0
- package/dist/components/Alert/index.d.ts +13 -0
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Alert/index.js +46 -0
- package/dist/components/AppBar/index.d.ts +19 -0
- package/dist/components/AppBar/index.d.ts.map +1 -0
- package/dist/components/AppBar/index.js +48 -0
- package/dist/components/AspectRatio/index.d.ts +8 -0
- package/dist/components/AspectRatio/index.d.ts.map +1 -0
- package/dist/components/AspectRatio/index.js +32 -0
- package/dist/components/Autocomplete/index.d.ts +21 -0
- package/dist/components/Autocomplete/index.d.ts.map +1 -0
- package/dist/components/Autocomplete/index.js +94 -0
- package/dist/components/Avatar/index.d.ts +12 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Avatar/index.js +32 -0
- package/dist/components/AvatarGroup/index.d.ts +9 -0
- package/dist/components/AvatarGroup/index.d.ts.map +1 -0
- package/dist/components/AvatarGroup/index.js +24 -0
- package/dist/components/Backdrop/index.d.ts +10 -0
- package/dist/components/Backdrop/index.d.ts.map +1 -0
- package/dist/components/Backdrop/index.js +25 -0
- package/dist/components/Badge/index.d.ts +10 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/Badge/index.js +30 -0
- package/dist/components/BottomNavigation/index.d.ts +16 -0
- package/dist/components/BottomNavigation/index.d.ts.map +1 -0
- package/dist/components/BottomNavigation/index.js +43 -0
- package/dist/components/Box/index.d.ts +21 -0
- package/dist/components/Box/index.d.ts.map +1 -0
- package/dist/components/Box/index.js +30 -0
- package/dist/components/Breadcrumb/index.d.ts +13 -0
- package/dist/components/Breadcrumb/index.d.ts.map +1 -0
- package/dist/components/Breadcrumb/index.js +19 -0
- package/dist/components/Button/index.d.ts +22 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +93 -0
- package/dist/components/ButtonGroup/index.d.ts +9 -0
- package/dist/components/ButtonGroup/index.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.js +27 -0
- package/dist/components/Card/index.d.ts +14 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Card/index.js +33 -0
- package/dist/components/Checkbox/index.d.ts +17 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/index.js +42 -0
- package/dist/components/Chip/index.d.ts +18 -0
- package/dist/components/Chip/index.d.ts.map +1 -0
- package/dist/components/Chip/index.js +60 -0
- package/dist/components/CircularProgress/index.d.ts +14 -0
- package/dist/components/CircularProgress/index.d.ts.map +1 -0
- package/dist/components/CircularProgress/index.js +58 -0
- package/dist/components/ClickAwayListener/index.d.ts +11 -0
- package/dist/components/ClickAwayListener/index.d.ts.map +1 -0
- package/dist/components/ClickAwayListener/index.js +31 -0
- package/dist/components/Code/index.d.ts +9 -0
- package/dist/components/Code/index.d.ts.map +1 -0
- package/dist/components/Code/index.js +50 -0
- package/dist/components/Collapse/index.d.ts +11 -0
- package/dist/components/Collapse/index.d.ts.map +1 -0
- package/dist/components/Collapse/index.js +30 -0
- package/dist/components/CommandPalette/index.d.ts +26 -0
- package/dist/components/CommandPalette/index.d.ts.map +1 -0
- package/dist/components/CommandPalette/index.js +141 -0
- package/dist/components/Container/index.d.ts +11 -0
- package/dist/components/Container/index.d.ts.map +1 -0
- package/dist/components/Container/index.js +18 -0
- package/dist/components/DashboardLayout/index.d.ts +15 -0
- package/dist/components/DashboardLayout/index.d.ts.map +1 -0
- package/dist/components/DashboardLayout/index.js +67 -0
- package/dist/components/DataTable/index.d.ts +27 -0
- package/dist/components/DataTable/index.d.ts.map +1 -0
- package/dist/components/DataTable/index.js +59 -0
- package/dist/components/Dialog/index.d.ts +19 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Dialog/index.js +96 -0
- package/dist/components/Divider/index.d.ts +13 -0
- package/dist/components/Divider/index.d.ts.map +1 -0
- package/dist/components/Divider/index.js +40 -0
- package/dist/components/Drawer/index.d.ts +17 -0
- package/dist/components/Drawer/index.d.ts.map +1 -0
- package/dist/components/Drawer/index.js +77 -0
- package/dist/components/DropdownMenu/index.d.ts +25 -0
- package/dist/components/DropdownMenu/index.d.ts.map +1 -0
- package/dist/components/DropdownMenu/index.js +67 -0
- package/dist/components/EmptyState/index.d.ts +11 -0
- package/dist/components/EmptyState/index.d.ts.map +1 -0
- package/dist/components/EmptyState/index.js +53 -0
- package/dist/components/ErrorState/index.d.ts +12 -0
- package/dist/components/ErrorState/index.d.ts.map +1 -0
- package/dist/components/ErrorState/index.js +54 -0
- package/dist/components/Fab/index.d.ts +16 -0
- package/dist/components/Fab/index.d.ts.map +1 -0
- package/dist/components/Fab/index.js +39 -0
- package/dist/components/Fade/index.d.ts +10 -0
- package/dist/components/Fade/index.d.ts.map +1 -0
- package/dist/components/Fade/index.js +13 -0
- package/dist/components/FocusTrap/index.d.ts +11 -0
- package/dist/components/FocusTrap/index.d.ts.map +1 -0
- package/dist/components/FocusTrap/index.js +69 -0
- package/dist/components/FormControl/index.d.ts +34 -0
- package/dist/components/FormControl/index.d.ts.map +1 -0
- package/dist/components/FormControl/index.js +52 -0
- package/dist/components/GlobalSearch/index.d.ts +23 -0
- package/dist/components/GlobalSearch/index.d.ts.map +1 -0
- package/dist/components/GlobalSearch/index.js +91 -0
- package/dist/components/Grid/index.d.ts +19 -0
- package/dist/components/Grid/index.d.ts.map +1 -0
- package/dist/components/Grid/index.js +30 -0
- package/dist/components/Grow/index.d.ts +10 -0
- package/dist/components/Grow/index.d.ts.map +1 -0
- package/dist/components/Grow/index.js +13 -0
- package/dist/components/IconButton/index.d.ts +16 -0
- package/dist/components/IconButton/index.d.ts.map +1 -0
- package/dist/components/IconButton/index.js +43 -0
- package/dist/components/ImageList/index.d.ts +21 -0
- package/dist/components/ImageList/index.d.ts.map +1 -0
- package/dist/components/ImageList/index.js +39 -0
- package/dist/components/Input/index.d.ts +33 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/index.js +45 -0
- package/dist/components/Kbd/index.d.ts +8 -0
- package/dist/components/Kbd/index.d.ts.map +1 -0
- package/dist/components/Kbd/index.js +41 -0
- package/dist/components/KeyboardShortcut/index.d.ts +20 -0
- package/dist/components/KeyboardShortcut/index.d.ts.map +1 -0
- package/dist/components/KeyboardShortcut/index.js +63 -0
- package/dist/components/Label/index.d.ts +10 -0
- package/dist/components/Label/index.d.ts.map +1 -0
- package/dist/components/Label/index.js +17 -0
- package/dist/components/LinearProgress/index.d.ts +13 -0
- package/dist/components/LinearProgress/index.d.ts.map +1 -0
- package/dist/components/LinearProgress/index.js +69 -0
- package/dist/components/Link/index.d.ts +16 -0
- package/dist/components/Link/index.d.ts.map +1 -0
- package/dist/components/Link/index.js +25 -0
- package/dist/components/List/index.d.ts +40 -0
- package/dist/components/List/index.d.ts.map +1 -0
- package/dist/components/List/index.js +70 -0
- package/dist/components/LoadingState/index.d.ts +11 -0
- package/dist/components/LoadingState/index.d.ts.map +1 -0
- package/dist/components/LoadingState/index.js +66 -0
- package/dist/components/Menu/index.d.ts +40 -0
- package/dist/components/Menu/index.d.ts.map +1 -0
- package/dist/components/Menu/index.js +103 -0
- package/dist/components/MobileStepper/index.d.ts +16 -0
- package/dist/components/MobileStepper/index.d.ts.map +1 -0
- package/dist/components/MobileStepper/index.js +67 -0
- package/dist/components/Modal/index.d.ts +14 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Modal/index.js +51 -0
- package/dist/components/Navbar/index.d.ts +14 -0
- package/dist/components/Navbar/index.d.ts.map +1 -0
- package/dist/components/Navbar/index.js +27 -0
- package/dist/components/NoSSR/index.d.ts +7 -0
- package/dist/components/NoSSR/index.d.ts.map +1 -0
- package/dist/components/NoSSR/index.js +9 -0
- package/dist/components/PageLayout/index.d.ts +13 -0
- package/dist/components/PageLayout/index.d.ts.map +1 -0
- package/dist/components/PageLayout/index.js +41 -0
- package/dist/components/Pagination/index.d.ts +11 -0
- package/dist/components/Pagination/index.d.ts.map +1 -0
- package/dist/components/Pagination/index.js +56 -0
- package/dist/components/Paper/index.d.ts +12 -0
- package/dist/components/Paper/index.d.ts.map +1 -0
- package/dist/components/Paper/index.js +24 -0
- package/dist/components/Popover/index.d.ts +13 -0
- package/dist/components/Popover/index.d.ts.map +1 -0
- package/dist/components/Popover/index.js +34 -0
- package/dist/components/Progress/index.d.ts +13 -0
- package/dist/components/Progress/index.d.ts.map +1 -0
- package/dist/components/Progress/index.js +40 -0
- package/dist/components/Radio/index.d.ts +7 -0
- package/dist/components/Radio/index.d.ts.map +1 -0
- package/dist/components/Radio/index.js +28 -0
- package/dist/components/Rating/index.d.ts +15 -0
- package/dist/components/Rating/index.d.ts.map +1 -0
- package/dist/components/Rating/index.js +41 -0
- package/dist/components/ResizablePanel/index.d.ts +16 -0
- package/dist/components/ResizablePanel/index.d.ts.map +1 -0
- package/dist/components/ResizablePanel/index.js +41 -0
- package/dist/components/ScrollArea/index.d.ts +12 -0
- package/dist/components/ScrollArea/index.d.ts.map +1 -0
- package/dist/components/ScrollArea/index.js +50 -0
- package/dist/components/Select/index.d.ts +23 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +52 -0
- package/dist/components/Sheet/index.d.ts +15 -0
- package/dist/components/Sheet/index.d.ts.map +1 -0
- package/dist/components/Sheet/index.js +61 -0
- package/dist/components/Sidebar/index.d.ts +23 -0
- package/dist/components/Sidebar/index.d.ts.map +1 -0
- package/dist/components/Sidebar/index.js +37 -0
- package/dist/components/Skeleton/index.d.ts +9 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Skeleton/index.js +22 -0
- package/dist/components/Slide/index.d.ts +12 -0
- package/dist/components/Slide/index.d.ts.map +1 -0
- package/dist/components/Slide/index.js +21 -0
- package/dist/components/Slider/index.d.ts +19 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/index.js +49 -0
- package/dist/components/Snackbar/index.d.ts +28 -0
- package/dist/components/Snackbar/index.d.ts.map +1 -0
- package/dist/components/Snackbar/index.js +71 -0
- package/dist/components/SpeedDial/index.d.ts +18 -0
- package/dist/components/SpeedDial/index.d.ts.map +1 -0
- package/dist/components/SpeedDial/index.js +71 -0
- package/dist/components/Spinner/index.d.ts +10 -0
- package/dist/components/Spinner/index.d.ts.map +1 -0
- package/dist/components/Spinner/index.js +67 -0
- package/dist/components/SplitPane/index.d.ts +11 -0
- package/dist/components/SplitPane/index.d.ts.map +1 -0
- package/dist/components/SplitPane/index.js +46 -0
- package/dist/components/Stack/index.d.ts +17 -0
- package/dist/components/Stack/index.d.ts.map +1 -0
- package/dist/components/Stack/index.js +30 -0
- package/dist/components/Stepper/index.d.ts +20 -0
- package/dist/components/Stepper/index.d.ts.map +1 -0
- package/dist/components/Stepper/index.js +66 -0
- package/dist/components/Switch/index.d.ts +13 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Switch/index.js +38 -0
- package/dist/components/Tabs/index.d.ts +20 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +62 -0
- package/dist/components/TextField/index.d.ts +35 -0
- package/dist/components/TextField/index.d.ts.map +1 -0
- package/dist/components/TextField/index.js +69 -0
- package/dist/components/Textarea/index.d.ts +22 -0
- package/dist/components/Textarea/index.d.ts.map +1 -0
- package/dist/components/Textarea/index.js +27 -0
- package/dist/components/Timeline/index.d.ts +16 -0
- package/dist/components/Timeline/index.d.ts.map +1 -0
- package/dist/components/Timeline/index.js +30 -0
- package/dist/components/Toast/index.d.ts +34 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +106 -0
- package/dist/components/ToggleButton/index.d.ts +21 -0
- package/dist/components/ToggleButton/index.d.ts.map +1 -0
- package/dist/components/ToggleButton/index.js +81 -0
- package/dist/components/Tooltip/index.d.ts +14 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.js +47 -0
- package/dist/components/TreeView/index.d.ts +19 -0
- package/dist/components/TreeView/index.d.ts.map +1 -0
- package/dist/components/TreeView/index.js +50 -0
- package/dist/components/Typography/index.d.ts +17 -0
- package/dist/components/Typography/index.d.ts.map +1 -0
- package/dist/components/Typography/index.js +44 -0
- package/dist/components/VisuallyHidden/index.d.ts +7 -0
- package/dist/components/VisuallyHidden/index.d.ts.map +1 -0
- package/dist/components/VisuallyHidden/index.js +18 -0
- package/dist/components/Zoom/index.d.ts +10 -0
- package/dist/components/Zoom/index.d.ts.map +1 -0
- package/dist/components/Zoom/index.js +13 -0
- package/dist/components/ai.d.ts +133 -0
- package/dist/components/ai.d.ts.map +1 -0
- package/dist/components/ai.js +184 -0
- package/dist/components/charts.d.ts +143 -0
- package/dist/components/charts.d.ts.map +1 -0
- package/dist/components/charts.js +435 -0
- package/dist/components/data.d.ts +192 -0
- package/dist/components/data.d.ts.map +1 -0
- package/dist/components/data.js +581 -0
- package/dist/components/date.d.ts +73 -0
- package/dist/components/date.d.ts.map +1 -0
- package/dist/components/date.js +199 -0
- package/dist/components/enterprise.d.ts +246 -0
- package/dist/components/enterprise.d.ts.map +1 -0
- package/dist/components/enterprise.js +428 -0
- package/dist/components/form.d.ts +132 -0
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +380 -0
- package/dist/components/index.d.ts +173 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +107 -0
- package/dist/components/inputs.d.ts +169 -0
- package/dist/components/inputs.d.ts.map +1 -0
- package/dist/components/inputs.js +437 -0
- package/dist/components/layout.d.ts +224 -0
- package/dist/components/layout.d.ts.map +1 -0
- package/dist/components/layout.js +644 -0
- package/dist/components/overlay.d.ts +102 -0
- package/dist/components/overlay.d.ts.map +1 -0
- package/dist/components/overlay.js +318 -0
- package/dist/components/surfaces.d.ts +180 -0
- package/dist/components/surfaces.d.ts.map +1 -0
- package/dist/components/surfaces.js +423 -0
- package/dist/components/typography.d.ts +69 -0
- package/dist/components/typography.d.ts.map +1 -0
- package/dist/components/typography.js +206 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/portal.d.ts +3 -0
- package/dist/portal.d.ts.map +1 -0
- package/dist/portal.js +17 -0
- package/dist/theme/index.d.ts +31 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +258 -0
- package/dist/tokens/component.d.ts +124 -0
- package/dist/tokens/component.d.ts.map +1 -0
- package/dist/tokens/component.js +113 -0
- package/dist/tokens/index.d.ts +494 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +345 -0
- package/dist/tokens/primitives.d.ts +675 -0
- package/dist/tokens/primitives.d.ts.map +1 -0
- package/dist/tokens/primitives.js +356 -0
- package/dist/tokens/semantic.d.ts +252 -0
- package/dist/tokens/semantic.d.ts.map +1 -0
- package/dist/tokens/semantic.js +242 -0
- package/dist/tokens/themes.d.ts +18 -0
- package/dist/tokens/themes.d.ts.map +1 -0
- package/dist/tokens/themes.js +316 -0
- package/package.json +69 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HyperUI Chart Components
|
|
3
|
+
* LineChart · BarChart · PieChart · Sparkline
|
|
4
|
+
*/
|
|
5
|
+
import { injectCSS, cn, h } from "../theme/index.js";
|
|
6
|
+
const CHART_CSS = `
|
|
7
|
+
.hu-chart {
|
|
8
|
+
display: flex; flex-direction: column; gap: var(--hu-space-3);
|
|
9
|
+
padding: var(--hu-space-4); border: 1px solid var(--hu-border);
|
|
10
|
+
border-radius: var(--hu-radius-md); background: var(--hu-bg); color: var(--hu-text);
|
|
11
|
+
}
|
|
12
|
+
.hu-chart__header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--hu-space-3); }
|
|
13
|
+
.hu-chart__title { font-size: var(--hu-font-size-sm); font-weight: var(--hu-font-weight-semibold); color: var(--hu-text); }
|
|
14
|
+
.hu-chart__meta { font-size: var(--hu-font-size-xs); color: var(--hu-text-2); }
|
|
15
|
+
.hu-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
|
|
16
|
+
.hu-chart__axis { stroke: var(--hu-border-2); stroke-width: 1; }
|
|
17
|
+
.hu-chart__grid { stroke: var(--hu-border); stroke-width: 1; opacity: .7; }
|
|
18
|
+
.hu-chart__label { fill: var(--hu-text-2); font-size: 11px; font-family: var(--hu-font-sans); }
|
|
19
|
+
.hu-chart__line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
|
|
20
|
+
.hu-chart__area { opacity: .16; }
|
|
21
|
+
.hu-chart__point { stroke: var(--hu-bg); stroke-width: 2; }
|
|
22
|
+
.hu-chart__bar { rx: 3; transition: opacity var(--hu-duration) var(--hu-ease); }
|
|
23
|
+
.hu-chart__bar:hover, .hu-chart__slice:hover, .hu-chart__heat-cell:hover { opacity: .86; }
|
|
24
|
+
.hu-chart__slice { stroke: var(--hu-bg); stroke-width: 2; }
|
|
25
|
+
.hu-chart__radar-shape { fill-opacity: .16; stroke-width: 2; vector-effect: non-scaling-stroke; }
|
|
26
|
+
.hu-chart__heat-cell { rx: 3; transition: opacity var(--hu-duration) var(--hu-ease); }
|
|
27
|
+
.hu-chart__gauge-track { fill: none; stroke: var(--hu-bg-3); stroke-width: 18; stroke-linecap: round; }
|
|
28
|
+
.hu-chart__gauge-value { fill: none; stroke-width: 18; stroke-linecap: round; }
|
|
29
|
+
.hu-chart__gauge-label { fill: var(--hu-text); font-size: 28px; font-weight: var(--hu-font-weight-semibold); font-family: var(--hu-font-sans); }
|
|
30
|
+
.hu-chart__candle-wick { stroke-width: 1.5; vector-effect: non-scaling-stroke; }
|
|
31
|
+
.hu-chart__candle-body { rx: 2; }
|
|
32
|
+
.hu-chart__volume { opacity: .22; }
|
|
33
|
+
.hu-sparkline { display: inline-flex; color: var(--hu-primary); }
|
|
34
|
+
.hu-sparkline svg { display: block; width: 100%; height: 100%; }
|
|
35
|
+
`;
|
|
36
|
+
const DEFAULT_CHART_COLORS = [
|
|
37
|
+
"var(--hu-primary)",
|
|
38
|
+
"var(--hu-success)",
|
|
39
|
+
"var(--hu-warning)",
|
|
40
|
+
"var(--hu-error)",
|
|
41
|
+
"var(--hu-info)",
|
|
42
|
+
"var(--hu-text-2)"
|
|
43
|
+
];
|
|
44
|
+
export function LineChart(props) {
|
|
45
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
46
|
+
const width = props.width ?? 640;
|
|
47
|
+
const height = props.height ?? 320;
|
|
48
|
+
const padding = { top: 20, right: 24, bottom: 38, left: 44 };
|
|
49
|
+
const bounds = getPlotBounds(width, height, padding);
|
|
50
|
+
const points = props.series.flatMap((series) => series.data);
|
|
51
|
+
const xValues = uniqueValues(points.map((point) => point.x));
|
|
52
|
+
const yExtent = getExtent(points.map((point) => point.y));
|
|
53
|
+
const colors = props.colors ?? DEFAULT_CHART_COLORS;
|
|
54
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Line chart" }, chartHeader(props.title, props.description ?? `${props.series.length} series`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Line chart" }, props.showGrid !== false && chartGrid(bounds, 4), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y2, x2: bounds.x2, y2: bounds.y2 }), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y, x2: bounds.x, y2: bounds.y2 }), ...props.series.map((series, index) => {
|
|
55
|
+
const color = series.color ?? colors[index % colors.length];
|
|
56
|
+
const path = series.data.map((point, pointIndex) => {
|
|
57
|
+
const x = scaleBand(point.x, xValues, bounds.x, bounds.x2);
|
|
58
|
+
const y = scaleLinear(point.y, yExtent.min, yExtent.max, bounds.y2, bounds.y);
|
|
59
|
+
return `${pointIndex === 0 ? "M" : "L"} ${x} ${y}`;
|
|
60
|
+
}).join(" ");
|
|
61
|
+
return h("g", { key: series.id, "aria-label": series.label }, h("path", { class: "hu-chart__line", d: path, stroke: color }), ...series.data.map((point) => h("circle", {
|
|
62
|
+
class: "hu-chart__point",
|
|
63
|
+
key: `${series.id}-${point.x}`,
|
|
64
|
+
cx: scaleBand(point.x, xValues, bounds.x, bounds.x2),
|
|
65
|
+
cy: scaleLinear(point.y, yExtent.min, yExtent.max, bounds.y2, bounds.y),
|
|
66
|
+
r: 3,
|
|
67
|
+
fill: color
|
|
68
|
+
})));
|
|
69
|
+
}), props.xLabel && h("text", { class: "hu-chart__label", x: width / 2, y: height - 4, "text-anchor": "middle" }, props.xLabel), props.yLabel && h("text", {
|
|
70
|
+
class: "hu-chart__label",
|
|
71
|
+
x: 12,
|
|
72
|
+
y: height / 2,
|
|
73
|
+
transform: `rotate(-90 12 ${height / 2})`,
|
|
74
|
+
"text-anchor": "middle"
|
|
75
|
+
}, props.yLabel)));
|
|
76
|
+
}
|
|
77
|
+
export function BarChart(props) {
|
|
78
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
79
|
+
const width = props.width ?? 640;
|
|
80
|
+
const height = props.height ?? 320;
|
|
81
|
+
const horizontal = props.orientation === "horizontal";
|
|
82
|
+
const padding = { top: 20, right: 24, bottom: 38, left: horizontal ? 96 : 44 };
|
|
83
|
+
const bounds = getPlotBounds(width, height, padding);
|
|
84
|
+
const max = Math.max(1, ...props.data.map((datum) => datum.value));
|
|
85
|
+
const bandSize = horizontal ? bounds.height / Math.max(1, props.data.length) : bounds.width / Math.max(1, props.data.length);
|
|
86
|
+
const color = props.color ?? "var(--hu-primary)";
|
|
87
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Bar chart" }, chartHeader(props.title, props.description ?? `${props.data.length} bars`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Bar chart" }, props.showGrid !== false && chartGrid(bounds, 4), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y2, x2: bounds.x2, y2: bounds.y2 }), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y, x2: bounds.x, y2: bounds.y2 }), ...props.data.map((datum, index) => {
|
|
88
|
+
const fill = datum.color ?? color;
|
|
89
|
+
if (horizontal) {
|
|
90
|
+
const barWidth = scaleLinear(datum.value, 0, max, 0, bounds.width);
|
|
91
|
+
return h("rect", {
|
|
92
|
+
key: datum.label,
|
|
93
|
+
class: "hu-chart__bar",
|
|
94
|
+
x: bounds.x,
|
|
95
|
+
y: bounds.y + index * bandSize + 4,
|
|
96
|
+
width: barWidth,
|
|
97
|
+
height: Math.max(4, bandSize - 8),
|
|
98
|
+
fill,
|
|
99
|
+
"aria-label": `${datum.label}: ${datum.value}`
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
const barHeight = scaleLinear(datum.value, 0, max, 0, bounds.height);
|
|
103
|
+
return h("rect", {
|
|
104
|
+
key: datum.label,
|
|
105
|
+
class: "hu-chart__bar",
|
|
106
|
+
x: bounds.x + index * bandSize + 4,
|
|
107
|
+
y: bounds.y2 - barHeight,
|
|
108
|
+
width: Math.max(4, bandSize - 8),
|
|
109
|
+
height: barHeight,
|
|
110
|
+
fill,
|
|
111
|
+
"aria-label": `${datum.label}: ${datum.value}`
|
|
112
|
+
});
|
|
113
|
+
})));
|
|
114
|
+
}
|
|
115
|
+
export function PieChart(props) {
|
|
116
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
117
|
+
const width = props.width ?? 360;
|
|
118
|
+
const height = props.height ?? 300;
|
|
119
|
+
const radius = Math.min(width, height) / 2 - 20;
|
|
120
|
+
const innerRadius = props.donut ? radius * .58 : 0;
|
|
121
|
+
const cx = width / 2;
|
|
122
|
+
const cy = height / 2;
|
|
123
|
+
const total = props.data.reduce((sum, datum) => sum + Math.max(0, datum.value), 0);
|
|
124
|
+
const colors = props.colors ?? DEFAULT_CHART_COLORS;
|
|
125
|
+
let angle = -90;
|
|
126
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Pie chart" }, chartHeader(props.title, props.description ?? `${props.data.length} slices`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Pie chart" }, ...props.data.map((datum, index) => {
|
|
127
|
+
const value = Math.max(0, datum.value);
|
|
128
|
+
const sweep = total > 0 ? value / total * 360 : 0;
|
|
129
|
+
const path = describeArc(cx, cy, radius, innerRadius, angle, angle + sweep);
|
|
130
|
+
angle += sweep;
|
|
131
|
+
return h("path", {
|
|
132
|
+
key: datum.label,
|
|
133
|
+
class: "hu-chart__slice",
|
|
134
|
+
d: path,
|
|
135
|
+
fill: datum.color ?? colors[index % colors.length],
|
|
136
|
+
"aria-label": `${datum.label}: ${datum.value}`
|
|
137
|
+
});
|
|
138
|
+
})));
|
|
139
|
+
}
|
|
140
|
+
export function AreaChart(props) {
|
|
141
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
142
|
+
const width = props.width ?? 640;
|
|
143
|
+
const height = props.height ?? 320;
|
|
144
|
+
const padding = { top: 20, right: 24, bottom: 38, left: 44 };
|
|
145
|
+
const bounds = getPlotBounds(width, height, padding);
|
|
146
|
+
const points = props.series.flatMap((series) => series.data);
|
|
147
|
+
const xValues = uniqueValues(points.map((point) => point.x));
|
|
148
|
+
const yExtent = getExtent(points.map((point) => point.y));
|
|
149
|
+
const colors = props.colors ?? DEFAULT_CHART_COLORS;
|
|
150
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Area chart" }, chartHeader(props.title, props.description ?? `${props.series.length} series`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Area chart" }, props.showGrid !== false && chartGrid(bounds, 4), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y2, x2: bounds.x2, y2: bounds.y2 }), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y, x2: bounds.x, y2: bounds.y2 }), ...props.series.map((series, index) => {
|
|
151
|
+
const color = series.color ?? colors[index % colors.length];
|
|
152
|
+
const linePoints = series.data.map((point) => ({
|
|
153
|
+
x: scaleBand(point.x, xValues, bounds.x, bounds.x2),
|
|
154
|
+
y: scaleLinear(point.y, yExtent.min, yExtent.max, bounds.y2, bounds.y)
|
|
155
|
+
}));
|
|
156
|
+
const linePath = linePoints.map((point, pointIndex) => `${pointIndex === 0 ? "M" : "L"} ${point.x} ${point.y}`).join(" ");
|
|
157
|
+
const areaPath = linePoints.length === 0
|
|
158
|
+
? ""
|
|
159
|
+
: `${linePath} L ${linePoints[linePoints.length - 1].x} ${bounds.y2} L ${linePoints[0].x} ${bounds.y2} Z`;
|
|
160
|
+
return h("g", { key: series.id, "aria-label": series.label }, h("path", { class: "hu-chart__area", d: areaPath, fill: color }), h("path", { class: "hu-chart__line", d: linePath, stroke: color }));
|
|
161
|
+
}), props.xLabel && h("text", { class: "hu-chart__label", x: width / 2, y: height - 4, "text-anchor": "middle" }, props.xLabel), props.yLabel && h("text", {
|
|
162
|
+
class: "hu-chart__label",
|
|
163
|
+
x: 12,
|
|
164
|
+
y: height / 2,
|
|
165
|
+
transform: `rotate(-90 12 ${height / 2})`,
|
|
166
|
+
"text-anchor": "middle"
|
|
167
|
+
}, props.yLabel)));
|
|
168
|
+
}
|
|
169
|
+
export function RadarChart(props) {
|
|
170
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
171
|
+
const width = props.width ?? 420;
|
|
172
|
+
const height = props.height ?? 360;
|
|
173
|
+
const cx = width / 2;
|
|
174
|
+
const cy = height / 2;
|
|
175
|
+
const radius = Math.min(width, height) / 2 - 42;
|
|
176
|
+
const levels = props.levels ?? 4;
|
|
177
|
+
const colors = props.colors ?? DEFAULT_CHART_COLORS;
|
|
178
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Radar chart" }, chartHeader(props.title, props.description ?? `${props.series.length} series`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Radar chart" }, ...Array.from({ length: levels }, (_, levelIndex) => {
|
|
179
|
+
const levelRadius = radius * (levelIndex + 1) / levels;
|
|
180
|
+
return h("polygon", {
|
|
181
|
+
key: `level-${levelIndex}`,
|
|
182
|
+
class: "hu-chart__grid",
|
|
183
|
+
points: props.axes.map((_, axisIndex) => radarPoint(cx, cy, levelRadius, axisIndex, props.axes.length)).join(" "),
|
|
184
|
+
fill: "none"
|
|
185
|
+
});
|
|
186
|
+
}), ...props.axes.map((axis, axisIndex) => {
|
|
187
|
+
const end = radarPointObject(cx, cy, radius, axisIndex, props.axes.length);
|
|
188
|
+
const label = radarPointObject(cx, cy, radius + 24, axisIndex, props.axes.length);
|
|
189
|
+
return h("g", { key: axis.key }, h("line", { class: "hu-chart__axis", x1: cx, y1: cy, x2: end.x, y2: end.y }), h("text", { class: "hu-chart__label", x: label.x, y: label.y, "text-anchor": "middle" }, axis.label));
|
|
190
|
+
}), ...props.series.map((series, seriesIndex) => {
|
|
191
|
+
const color = series.color ?? colors[seriesIndex % colors.length];
|
|
192
|
+
const points = props.axes.map((axis, axisIndex) => {
|
|
193
|
+
const max = axis.max ?? Math.max(1, ...props.series.map((item) => item.values[axis.key] ?? 0));
|
|
194
|
+
const value = Math.max(0, Math.min(max, series.values[axis.key] ?? 0));
|
|
195
|
+
return radarPoint(cx, cy, radius * value / max, axisIndex, props.axes.length);
|
|
196
|
+
}).join(" ");
|
|
197
|
+
return h("polygon", {
|
|
198
|
+
key: series.id,
|
|
199
|
+
class: "hu-chart__radar-shape",
|
|
200
|
+
points,
|
|
201
|
+
fill: color,
|
|
202
|
+
stroke: color,
|
|
203
|
+
"aria-label": series.label
|
|
204
|
+
});
|
|
205
|
+
})));
|
|
206
|
+
}
|
|
207
|
+
export function HeatMap(props) {
|
|
208
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
209
|
+
const width = props.width ?? 640;
|
|
210
|
+
const height = props.height ?? 320;
|
|
211
|
+
const padding = { top: 20, right: 20, bottom: 40, left: 72 };
|
|
212
|
+
const bounds = getPlotBounds(width, height, padding);
|
|
213
|
+
const xValues = uniqueValues(props.data.map((datum) => datum.x));
|
|
214
|
+
const yValues = uniqueValues(props.data.map((datum) => datum.y));
|
|
215
|
+
const extent = getExtent(props.data.map((datum) => datum.value));
|
|
216
|
+
const min = props.min ?? extent.min;
|
|
217
|
+
const max = props.max ?? extent.max;
|
|
218
|
+
const colors = props.colors ?? ["var(--hu-primary-bg)", "var(--hu-primary)"];
|
|
219
|
+
const cellWidth = bounds.width / Math.max(1, xValues.length);
|
|
220
|
+
const cellHeight = bounds.height / Math.max(1, yValues.length);
|
|
221
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Heat map" }, chartHeader(props.title, props.description ?? `${props.data.length} cells`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Heat map" }, ...props.data.map((datum) => {
|
|
222
|
+
const xIndex = xValues.findIndex((value) => value === datum.x);
|
|
223
|
+
const yIndex = yValues.findIndex((value) => value === datum.y);
|
|
224
|
+
return h("rect", {
|
|
225
|
+
key: `${datum.x}-${datum.y}`,
|
|
226
|
+
class: "hu-chart__heat-cell",
|
|
227
|
+
x: bounds.x + xIndex * cellWidth + 2,
|
|
228
|
+
y: bounds.y + yIndex * cellHeight + 2,
|
|
229
|
+
width: Math.max(4, cellWidth - 4),
|
|
230
|
+
height: Math.max(4, cellHeight - 4),
|
|
231
|
+
fill: colors[1],
|
|
232
|
+
opacity: scaleLinear(datum.value, min, max, .18, 1),
|
|
233
|
+
"aria-label": `${datum.x} ${datum.y}: ${datum.value}`
|
|
234
|
+
});
|
|
235
|
+
}), ...xValues.map((value, index) => h("text", { key: `x-${value}`, class: "hu-chart__label", x: bounds.x + index * cellWidth + cellWidth / 2, y: height - 12, "text-anchor": "middle" }, value)), ...yValues.map((value, index) => h("text", { key: `y-${value}`, class: "hu-chart__label", x: bounds.x - 8, y: bounds.y + index * cellHeight + cellHeight / 2, "text-anchor": "end", "dominant-baseline": "middle" }, value))));
|
|
236
|
+
}
|
|
237
|
+
export function GaugeChart(props) {
|
|
238
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
239
|
+
const width = props.width ?? 360;
|
|
240
|
+
const height = props.height ?? 220;
|
|
241
|
+
const min = props.min ?? 0;
|
|
242
|
+
const max = props.max ?? 100;
|
|
243
|
+
const value = Math.max(min, Math.min(max, props.value));
|
|
244
|
+
const ratio = max === min ? 0 : (value - min) / (max - min);
|
|
245
|
+
const cx = width / 2;
|
|
246
|
+
const cy = height - 28;
|
|
247
|
+
const radius = Math.min(width / 2 - 32, height - 54);
|
|
248
|
+
const startAngle = -90;
|
|
249
|
+
const endAngle = 90;
|
|
250
|
+
const valueAngle = startAngle + ratio * (endAngle - startAngle);
|
|
251
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Gauge chart" }, chartHeader(props.title, props.description ?? `${value} of ${max}`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Gauge chart" }, h("path", { class: "hu-chart__gauge-track", d: describeOpenArc(cx, cy, radius, startAngle, endAngle) }), h("path", {
|
|
252
|
+
class: "hu-chart__gauge-value",
|
|
253
|
+
d: describeOpenArc(cx, cy, radius, startAngle, valueAngle),
|
|
254
|
+
stroke: props.color ?? "var(--hu-primary)",
|
|
255
|
+
"aria-label": `${value}`
|
|
256
|
+
}), h("text", { class: "hu-chart__gauge-label", x: cx, y: cy - 16, "text-anchor": "middle" }, props.label ?? String(value)), h("text", { class: "hu-chart__label", x: 32, y: cy + 24, "text-anchor": "middle" }, String(min)), h("text", { class: "hu-chart__label", x: width - 32, y: cy + 24, "text-anchor": "middle" }, String(max))));
|
|
257
|
+
}
|
|
258
|
+
export function FinancialChart(props) {
|
|
259
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
260
|
+
const width = props.width ?? 720;
|
|
261
|
+
const height = props.height ?? 340;
|
|
262
|
+
const padding = { top: 20, right: 24, bottom: 38, left: 56 };
|
|
263
|
+
const bounds = getPlotBounds(width, height, padding);
|
|
264
|
+
const metric = props.metric ?? "close";
|
|
265
|
+
const values = props.data.map((datum) => datum[metric]);
|
|
266
|
+
const extent = getExtent(values);
|
|
267
|
+
const xValues = props.data.map((datum) => datum.date);
|
|
268
|
+
const color = props.color ?? "var(--hu-primary)";
|
|
269
|
+
const volumeColor = props.volumeColor ?? "var(--hu-text-2)";
|
|
270
|
+
const maxVolume = Math.max(1, ...props.data.map((datum) => datum.volume ?? 0));
|
|
271
|
+
const volumeHeight = props.showVolume ? bounds.height * .22 : 0;
|
|
272
|
+
const path = props.data.map((datum, index) => {
|
|
273
|
+
const x = scaleBand(datum.date, xValues, bounds.x, bounds.x2);
|
|
274
|
+
const y = scaleLinear(datum[metric], extent.min, extent.max, bounds.y2 - volumeHeight, bounds.y);
|
|
275
|
+
return `${index === 0 ? "M" : "L"} ${x} ${y}`;
|
|
276
|
+
}).join(" ");
|
|
277
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Financial chart" }, chartHeader(props.title, props.description ?? `${props.data.length} points · ${metric}`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Financial chart" }, props.showGrid !== false && chartGrid(bounds, 4), props.showVolume && volumeBars(props.data, xValues, bounds, maxVolume, volumeColor), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y2, x2: bounds.x2, y2: bounds.y2 }), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y, x2: bounds.x, y2: bounds.y2 }), h("path", { class: "hu-chart__line", d: path, stroke: color }), ...props.data.map((datum) => h("circle", {
|
|
278
|
+
class: "hu-chart__point",
|
|
279
|
+
key: String(datum.date),
|
|
280
|
+
cx: scaleBand(datum.date, xValues, bounds.x, bounds.x2),
|
|
281
|
+
cy: scaleLinear(datum[metric], extent.min, extent.max, bounds.y2 - volumeHeight, bounds.y),
|
|
282
|
+
r: 3,
|
|
283
|
+
fill: color,
|
|
284
|
+
"aria-label": `${datum.date}: ${datum[metric]}`
|
|
285
|
+
}))));
|
|
286
|
+
}
|
|
287
|
+
export function CandlestickChart(props) {
|
|
288
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
289
|
+
const width = props.width ?? 720;
|
|
290
|
+
const height = props.height ?? 360;
|
|
291
|
+
const padding = { top: 20, right: 24, bottom: 38, left: 56 };
|
|
292
|
+
const bounds = getPlotBounds(width, height, padding);
|
|
293
|
+
const xValues = props.data.map((datum) => datum.date);
|
|
294
|
+
const priceExtent = getExtent(props.data.flatMap((datum) => [datum.high, datum.low]));
|
|
295
|
+
const upColor = props.upColor ?? "var(--hu-success)";
|
|
296
|
+
const downColor = props.downColor ?? "var(--hu-error)";
|
|
297
|
+
const volumeColor = props.volumeColor ?? "var(--hu-text-2)";
|
|
298
|
+
const maxVolume = Math.max(1, ...props.data.map((datum) => datum.volume ?? 0));
|
|
299
|
+
const volumeHeight = props.showVolume ? bounds.height * .2 : 0;
|
|
300
|
+
const bandSize = bounds.width / Math.max(1, props.data.length);
|
|
301
|
+
const candleWidth = Math.max(4, Math.min(14, bandSize * .56));
|
|
302
|
+
return h("section", { class: cn("hu-chart", props.class), "aria-label": props.title ?? "Candlestick chart" }, chartHeader(props.title, props.description ?? `${props.data.length} candles`), h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.title ?? "Candlestick chart" }, props.showGrid !== false && chartGrid(bounds, 4), props.showVolume && volumeBars(props.data, xValues, bounds, maxVolume, volumeColor), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y2, x2: bounds.x2, y2: bounds.y2 }), h("line", { class: "hu-chart__axis", x1: bounds.x, y1: bounds.y, x2: bounds.x, y2: bounds.y2 }), ...props.data.map((datum) => {
|
|
303
|
+
const x = scaleBand(datum.date, xValues, bounds.x, bounds.x2);
|
|
304
|
+
const high = scaleLinear(datum.high, priceExtent.min, priceExtent.max, bounds.y2 - volumeHeight, bounds.y);
|
|
305
|
+
const low = scaleLinear(datum.low, priceExtent.min, priceExtent.max, bounds.y2 - volumeHeight, bounds.y);
|
|
306
|
+
const open = scaleLinear(datum.open, priceExtent.min, priceExtent.max, bounds.y2 - volumeHeight, bounds.y);
|
|
307
|
+
const close = scaleLinear(datum.close, priceExtent.min, priceExtent.max, bounds.y2 - volumeHeight, bounds.y);
|
|
308
|
+
const rising = datum.close >= datum.open;
|
|
309
|
+
const color = rising ? upColor : downColor;
|
|
310
|
+
return h("g", { key: String(datum.date), "aria-label": `${datum.date}: open ${datum.open}, high ${datum.high}, low ${datum.low}, close ${datum.close}` }, h("line", { class: "hu-chart__candle-wick", x1: x, y1: high, x2: x, y2: low, stroke: color }), h("rect", {
|
|
311
|
+
class: "hu-chart__candle-body",
|
|
312
|
+
x: x - candleWidth / 2,
|
|
313
|
+
y: Math.min(open, close),
|
|
314
|
+
width: candleWidth,
|
|
315
|
+
height: Math.max(2, Math.abs(close - open)),
|
|
316
|
+
fill: color
|
|
317
|
+
}));
|
|
318
|
+
})));
|
|
319
|
+
}
|
|
320
|
+
export function Sparkline(props) {
|
|
321
|
+
injectCSS("hu-charts", CHART_CSS);
|
|
322
|
+
const width = props.width ?? 160;
|
|
323
|
+
const height = props.height ?? 40;
|
|
324
|
+
const extent = getExtent(props.data);
|
|
325
|
+
const path = props.data.map((value, index) => {
|
|
326
|
+
const x = props.data.length <= 1 ? width / 2 : index / (props.data.length - 1) * width;
|
|
327
|
+
const y = scaleLinear(value, extent.min, extent.max, height - 2, 2);
|
|
328
|
+
return `${index === 0 ? "M" : "L"} ${x} ${y}`;
|
|
329
|
+
}).join(" ");
|
|
330
|
+
return h("span", { class: cn("hu-sparkline", props.class), "aria-label": props.label ?? "Sparkline" }, h("svg", { viewBox: `0 0 ${width} ${height}`, role: "img", "aria-label": props.label ?? "Sparkline" }, h("path", {
|
|
331
|
+
class: "hu-chart__line",
|
|
332
|
+
d: path,
|
|
333
|
+
stroke: props.color ?? "currentColor",
|
|
334
|
+
"stroke-width": props.strokeWidth ?? 2
|
|
335
|
+
})));
|
|
336
|
+
}
|
|
337
|
+
function chartHeader(title, meta) {
|
|
338
|
+
return Boolean(title || meta) && h("div", { class: "hu-chart__header" }, title && h("div", { class: "hu-chart__title" }, title), meta && h("div", { class: "hu-chart__meta" }, meta));
|
|
339
|
+
}
|
|
340
|
+
function chartGrid(bounds, lines) {
|
|
341
|
+
return Array.from({ length: lines + 1 }, (_, index) => {
|
|
342
|
+
const y = bounds.y + index / lines * bounds.height;
|
|
343
|
+
return h("line", { key: `grid-${index}`, class: "hu-chart__grid", x1: bounds.x, y1: y, x2: bounds.x2, y2: y });
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function volumeBars(data, xValues, bounds, maxVolume, color) {
|
|
347
|
+
const bandSize = bounds.width / Math.max(1, data.length);
|
|
348
|
+
const maxHeight = bounds.height * .18;
|
|
349
|
+
return data.map((datum) => {
|
|
350
|
+
const barHeight = scaleLinear(datum.volume ?? 0, 0, maxVolume, 0, maxHeight);
|
|
351
|
+
return h("rect", {
|
|
352
|
+
key: `volume-${datum.date}`,
|
|
353
|
+
class: "hu-chart__volume",
|
|
354
|
+
x: scaleBand(datum.date, xValues, bounds.x, bounds.x2) - Math.max(3, bandSize * .25),
|
|
355
|
+
y: bounds.y2 - barHeight,
|
|
356
|
+
width: Math.max(3, bandSize * .5),
|
|
357
|
+
height: barHeight,
|
|
358
|
+
fill: color,
|
|
359
|
+
"aria-label": `${datum.date} volume: ${datum.volume ?? 0}`
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
function getPlotBounds(width, height, padding) {
|
|
364
|
+
const x = padding.left;
|
|
365
|
+
const y = padding.top;
|
|
366
|
+
const x2 = width - padding.right;
|
|
367
|
+
const y2 = height - padding.bottom;
|
|
368
|
+
return { x, y, x2, y2, width: x2 - x, height: y2 - y };
|
|
369
|
+
}
|
|
370
|
+
function getExtent(values) {
|
|
371
|
+
if (values.length === 0)
|
|
372
|
+
return { min: 0, max: 1 };
|
|
373
|
+
const min = Math.min(...values);
|
|
374
|
+
const max = Math.max(...values);
|
|
375
|
+
return min === max ? { min: min - 1, max: max + 1 } : { min, max };
|
|
376
|
+
}
|
|
377
|
+
function uniqueValues(values) {
|
|
378
|
+
return [...new Set(values)];
|
|
379
|
+
}
|
|
380
|
+
function scaleLinear(value, domainMin, domainMax, rangeMin, rangeMax) {
|
|
381
|
+
if (domainMax === domainMin)
|
|
382
|
+
return (rangeMin + rangeMax) / 2;
|
|
383
|
+
const ratio = (value - domainMin) / (domainMax - domainMin);
|
|
384
|
+
return rangeMin + ratio * (rangeMax - rangeMin);
|
|
385
|
+
}
|
|
386
|
+
function scaleBand(value, values, rangeMin, rangeMax) {
|
|
387
|
+
if (values.length <= 1)
|
|
388
|
+
return (rangeMin + rangeMax) / 2;
|
|
389
|
+
const index = Math.max(0, values.findIndex((item) => item === value));
|
|
390
|
+
return rangeMin + index / (values.length - 1) * (rangeMax - rangeMin);
|
|
391
|
+
}
|
|
392
|
+
function polarToCartesian(cx, cy, radius, angleInDegrees) {
|
|
393
|
+
const angleInRadians = (angleInDegrees - 90) * Math.PI / 180;
|
|
394
|
+
return {
|
|
395
|
+
x: cx + radius * Math.cos(angleInRadians),
|
|
396
|
+
y: cy + radius * Math.sin(angleInRadians)
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function describeArc(cx, cy, radius, innerRadius, startAngle, endAngle) {
|
|
400
|
+
const safeEnd = endAngle - startAngle >= 360 ? endAngle - .001 : endAngle;
|
|
401
|
+
const start = polarToCartesian(cx, cy, radius, safeEnd);
|
|
402
|
+
const end = polarToCartesian(cx, cy, radius, startAngle);
|
|
403
|
+
const largeArcFlag = safeEnd - startAngle <= 180 ? "0" : "1";
|
|
404
|
+
if (innerRadius <= 0) {
|
|
405
|
+
return [
|
|
406
|
+
`M ${cx} ${cy}`,
|
|
407
|
+
`L ${start.x} ${start.y}`,
|
|
408
|
+
`A ${radius} ${radius} 0 ${largeArcFlag} 0 ${end.x} ${end.y}`,
|
|
409
|
+
"Z"
|
|
410
|
+
].join(" ");
|
|
411
|
+
}
|
|
412
|
+
const innerStart = polarToCartesian(cx, cy, innerRadius, safeEnd);
|
|
413
|
+
const innerEnd = polarToCartesian(cx, cy, innerRadius, startAngle);
|
|
414
|
+
return [
|
|
415
|
+
`M ${start.x} ${start.y}`,
|
|
416
|
+
`A ${radius} ${radius} 0 ${largeArcFlag} 0 ${end.x} ${end.y}`,
|
|
417
|
+
`L ${innerEnd.x} ${innerEnd.y}`,
|
|
418
|
+
`A ${innerRadius} ${innerRadius} 0 ${largeArcFlag} 1 ${innerStart.x} ${innerStart.y}`,
|
|
419
|
+
"Z"
|
|
420
|
+
].join(" ");
|
|
421
|
+
}
|
|
422
|
+
function radarPoint(cx, cy, radius, index, total) {
|
|
423
|
+
const point = radarPointObject(cx, cy, radius, index, total);
|
|
424
|
+
return `${point.x},${point.y}`;
|
|
425
|
+
}
|
|
426
|
+
function radarPointObject(cx, cy, radius, index, total) {
|
|
427
|
+
const angle = -90 + index / Math.max(1, total) * 360;
|
|
428
|
+
return polarToCartesian(cx, cy, radius, angle + 90);
|
|
429
|
+
}
|
|
430
|
+
function describeOpenArc(cx, cy, radius, startAngle, endAngle) {
|
|
431
|
+
const start = polarToCartesian(cx, cy, radius, endAngle);
|
|
432
|
+
const end = polarToCartesian(cx, cy, radius, startAngle);
|
|
433
|
+
const largeArcFlag = Math.abs(endAngle - startAngle) <= 180 ? "0" : "1";
|
|
434
|
+
return `M ${start.x} ${start.y} A ${radius} ${radius} 0 ${largeArcFlag} 0 ${end.x} ${end.y}`;
|
|
435
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HyperUI Data Components
|
|
3
|
+
* VirtualTable · AdvancedFilters · SearchBuilder
|
|
4
|
+
*/
|
|
5
|
+
import { type VNode } from "../theme/index.js";
|
|
6
|
+
import { type SelectOption } from "./Select/index.js";
|
|
7
|
+
export interface VirtualTableColumn<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
8
|
+
key: keyof T & string;
|
|
9
|
+
header: string;
|
|
10
|
+
width?: string | number;
|
|
11
|
+
align?: "left" | "center" | "right";
|
|
12
|
+
render?: (row: T, index: number) => unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface VirtualTableProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
15
|
+
columns: Array<VirtualTableColumn<T>>;
|
|
16
|
+
rows: T[];
|
|
17
|
+
rowHeight?: number;
|
|
18
|
+
height?: number | string;
|
|
19
|
+
startIndex?: number;
|
|
20
|
+
visibleCount?: number;
|
|
21
|
+
rowKey?: (row: T, index: number) => string;
|
|
22
|
+
emptyMessage?: string;
|
|
23
|
+
class?: string;
|
|
24
|
+
onRowClick?: (row: T, index: number) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function VirtualTable<T extends Record<string, unknown>>(props: VirtualTableProps<T>): VNode;
|
|
27
|
+
export type FilterOperator = "equals" | "notEquals" | "contains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "between" | "isEmpty" | "isNotEmpty";
|
|
28
|
+
export interface FilterField {
|
|
29
|
+
key: string;
|
|
30
|
+
label: string;
|
|
31
|
+
type?: "text" | "number" | "date" | "select";
|
|
32
|
+
options?: SelectOption[];
|
|
33
|
+
}
|
|
34
|
+
export interface FilterRule {
|
|
35
|
+
id: string;
|
|
36
|
+
field: string;
|
|
37
|
+
operator: FilterOperator;
|
|
38
|
+
value?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface AdvancedFiltersProps {
|
|
41
|
+
fields: FilterField[];
|
|
42
|
+
rules?: FilterRule[];
|
|
43
|
+
title?: string;
|
|
44
|
+
class?: string;
|
|
45
|
+
onAddRule?: () => void;
|
|
46
|
+
onRemoveRule?: (id: string) => void;
|
|
47
|
+
onRuleChange?: (rule: FilterRule) => void;
|
|
48
|
+
}
|
|
49
|
+
export declare function AdvancedFilters(props: AdvancedFiltersProps): VNode;
|
|
50
|
+
export interface SearchToken {
|
|
51
|
+
key: string;
|
|
52
|
+
label: string;
|
|
53
|
+
value: string;
|
|
54
|
+
}
|
|
55
|
+
export interface SearchBuilderProps {
|
|
56
|
+
query?: string;
|
|
57
|
+
tokens?: SearchToken[];
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
class?: string;
|
|
60
|
+
onQueryChange?: (query: string) => void;
|
|
61
|
+
onSearch?: (query: string, tokens: SearchToken[]) => void;
|
|
62
|
+
onRemoveToken?: (key: string) => void;
|
|
63
|
+
}
|
|
64
|
+
export declare function SearchBuilder(props: SearchBuilderProps): VNode;
|
|
65
|
+
export interface DataGridColumn<T extends Record<string, unknown> = Record<string, unknown>> extends VirtualTableColumn<T> {
|
|
66
|
+
visible?: boolean;
|
|
67
|
+
searchable?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface DataGridProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
70
|
+
columns: Array<DataGridColumn<T>>;
|
|
71
|
+
rows: T[];
|
|
72
|
+
rowKey?: (row: T, index: number) => string;
|
|
73
|
+
query?: string;
|
|
74
|
+
filters?: FilterRule[];
|
|
75
|
+
filterFields?: FilterField[];
|
|
76
|
+
selectedRows?: string[];
|
|
77
|
+
page?: number;
|
|
78
|
+
pageSize?: number;
|
|
79
|
+
totalRows?: number;
|
|
80
|
+
height?: string | number;
|
|
81
|
+
rowHeight?: number;
|
|
82
|
+
visibleStartIndex?: number;
|
|
83
|
+
visibleCount?: number;
|
|
84
|
+
showColumnControls?: boolean;
|
|
85
|
+
toolbarActions?: unknown;
|
|
86
|
+
class?: string;
|
|
87
|
+
onQueryChange?: (query: string) => void;
|
|
88
|
+
onFilterAdd?: () => void;
|
|
89
|
+
onFilterRemove?: (id: string) => void;
|
|
90
|
+
onFilterChange?: (rule: FilterRule) => void;
|
|
91
|
+
onSelectedRowsChange?: (keys: string[]) => void;
|
|
92
|
+
onColumnVisibilityChange?: (key: string, visible: boolean) => void;
|
|
93
|
+
onPageChange?: (page: number) => void;
|
|
94
|
+
onRowClick?: (row: T, index: number) => void;
|
|
95
|
+
}
|
|
96
|
+
export declare function DataGrid<T extends Record<string, unknown>>(props: DataGridProps<T>): VNode;
|
|
97
|
+
export type DataExportFormat = "csv" | "json";
|
|
98
|
+
export interface DataExportColumn<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
99
|
+
key: keyof T & string;
|
|
100
|
+
header: string;
|
|
101
|
+
selected?: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface DataExportPayload<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
104
|
+
format: DataExportFormat;
|
|
105
|
+
filename: string;
|
|
106
|
+
rows: T[];
|
|
107
|
+
columns: Array<DataExportColumn<T>>;
|
|
108
|
+
content: string;
|
|
109
|
+
}
|
|
110
|
+
export interface DataExporterProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
111
|
+
rows: T[];
|
|
112
|
+
columns: Array<DataExportColumn<T>>;
|
|
113
|
+
format?: DataExportFormat;
|
|
114
|
+
filename?: string;
|
|
115
|
+
includeHeaders?: boolean;
|
|
116
|
+
selectedColumns?: string[];
|
|
117
|
+
title?: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
class?: string;
|
|
120
|
+
onFormatChange?: (format: DataExportFormat) => void;
|
|
121
|
+
onFilenameChange?: (filename: string) => void;
|
|
122
|
+
onColumnToggle?: (key: string, selected: boolean) => void;
|
|
123
|
+
onExport?: (payload: DataExportPayload<T>) => void;
|
|
124
|
+
}
|
|
125
|
+
export declare function DataExporter<T extends Record<string, unknown>>(props: DataExporterProps<T>): VNode;
|
|
126
|
+
export type DataImportFormat = "csv" | "json";
|
|
127
|
+
export type DataImportStatus = "idle" | "ready" | "parsing" | "success" | "error";
|
|
128
|
+
export interface DataImportColumn<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
129
|
+
key: keyof T & string;
|
|
130
|
+
header: string;
|
|
131
|
+
required?: boolean;
|
|
132
|
+
mappedTo?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface DataImporterProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
135
|
+
columns?: Array<DataImportColumn<T>>;
|
|
136
|
+
previewRows?: T[];
|
|
137
|
+
format?: DataImportFormat;
|
|
138
|
+
accept?: string;
|
|
139
|
+
multiple?: boolean;
|
|
140
|
+
fileName?: string;
|
|
141
|
+
maxFileSize?: number;
|
|
142
|
+
status?: DataImportStatus;
|
|
143
|
+
title?: string;
|
|
144
|
+
description?: string;
|
|
145
|
+
error?: string;
|
|
146
|
+
class?: string;
|
|
147
|
+
onFormatChange?: (format: DataImportFormat) => void;
|
|
148
|
+
onFileSelect?: (file: File, e: Event) => void;
|
|
149
|
+
onImport?: (rows: T[]) => void;
|
|
150
|
+
onClear?: () => void;
|
|
151
|
+
}
|
|
152
|
+
export declare function DataImporter<T extends Record<string, unknown>>(props: DataImporterProps<T>): VNode;
|
|
153
|
+
export interface TreeGridRow<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
154
|
+
id: string;
|
|
155
|
+
data: T;
|
|
156
|
+
children?: Array<TreeGridRow<T>>;
|
|
157
|
+
disabled?: boolean;
|
|
158
|
+
}
|
|
159
|
+
export interface TreeGridProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
160
|
+
columns: Array<DataGridColumn<T>>;
|
|
161
|
+
rows: Array<TreeGridRow<T>>;
|
|
162
|
+
expanded?: string[];
|
|
163
|
+
selected?: string;
|
|
164
|
+
rowHeight?: number;
|
|
165
|
+
height?: string | number;
|
|
166
|
+
emptyMessage?: string;
|
|
167
|
+
class?: string;
|
|
168
|
+
onToggle?: (id: string, expanded: boolean) => void;
|
|
169
|
+
onRowClick?: (row: TreeGridRow<T>) => void;
|
|
170
|
+
}
|
|
171
|
+
export declare function TreeGrid<T extends Record<string, unknown>>(props: TreeGridProps<T>): VNode;
|
|
172
|
+
export type PivotAggregation = "sum" | "count" | "avg" | "min" | "max";
|
|
173
|
+
export interface PivotGridField<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
174
|
+
key: keyof T & string;
|
|
175
|
+
header: string;
|
|
176
|
+
}
|
|
177
|
+
export interface PivotGridProps<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
178
|
+
rows: T[];
|
|
179
|
+
rowFields: Array<PivotGridField<T>>;
|
|
180
|
+
columnField: PivotGridField<T>;
|
|
181
|
+
valueField: PivotGridField<T>;
|
|
182
|
+
aggregation?: PivotAggregation;
|
|
183
|
+
title?: string;
|
|
184
|
+
class?: string;
|
|
185
|
+
formatValue?: (value: number, context: {
|
|
186
|
+
rowKey: string;
|
|
187
|
+
columnKey: string;
|
|
188
|
+
aggregation: PivotAggregation;
|
|
189
|
+
}) => unknown;
|
|
190
|
+
}
|
|
191
|
+
export declare function PivotGrid<T extends Record<string, unknown>>(props: PivotGridProps<T>): VNode;
|
|
192
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/components/data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAGjE,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA6J9D,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7F,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CAC7C;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAA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