@siyahi/ui 0.1.7-next.3 → 0.1.8-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -4
- package/THIRD_PARTY_NOTICES.md +10 -9
- package/dist/components/registry/charts/area-chart-card.d.ts +9 -0
- package/dist/components/registry/charts/area-chart-card.js +22 -0
- package/dist/components/registry/charts/bar-chart-card.d.ts +9 -0
- package/dist/components/registry/charts/bar-chart-card.js +25 -0
- package/dist/components/registry/charts/line-chart-card.d.ts +5 -0
- package/dist/components/registry/charts/line-chart-card.js +21 -0
- package/dist/components/registry/dashboardcn/bar-list.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -2
- package/dist/lib/chart-frame.d.ts +22 -0
- package/dist/lib/chart-frame.js +96 -0
- package/dist/lib/chart-series.d.ts +40 -0
- package/dist/lib/chart-series.js +0 -0
- package/package.json +1 -1
- package/registry.lock.json +24 -0
package/README.md
CHANGED
|
@@ -54,8 +54,8 @@ the hashed URLs of `geist-latin-wght-normal.woff2`,
|
|
|
54
54
|
`geist-latin-ext-wght-normal.woff2` and `geist-mono-latin-wght-normal.woff2`.
|
|
55
55
|
|
|
56
56
|
Everything comes from `@siyahi/ui`: the shadcn components, the registry
|
|
57
|
-
add-ons (data table, heatmaps, stat tiles, sidebar)
|
|
58
|
-
|
|
57
|
+
add-ons (chart cards, data table, heatmaps, stat tiles, sidebar) and Siyahi's
|
|
58
|
+
own components. Add `lucide-react` only if your
|
|
59
59
|
own code imports icons. A Next.js app compiles the same stylesheet through
|
|
60
60
|
`@tailwindcss/postcss` instead of the Vite plugin.
|
|
61
61
|
|
|
@@ -69,8 +69,9 @@ Every merge to `main` also attaches both tarballs to a GitHub release
|
|
|
69
69
|
|
|
70
70
|
- **shadcn/ui components** in the `base-luma` style, installed with the shadcn
|
|
71
71
|
CLI and never edited.
|
|
72
|
-
- **Registry add-ons**, copied once with their origin and licence recorded:
|
|
73
|
-
|
|
72
|
+
- **Registry add-ons**, copied once with their origin and licence recorded:
|
|
73
|
+
bar, area and line chart cards from shadcn's chart blocks, a data table on
|
|
74
|
+
TanStack Table, calendar, weekday and status heatmaps, a ranked
|
|
74
75
|
bar list, the `SectionCards` stat tile and the `sidebar-07` app shell.
|
|
75
76
|
- **Siyahi components**: `Delta` (a signed figure with ▲ ▼), `PriceChart`
|
|
76
77
|
(TradingView Lightweight Charts in theme colours), `Treemap` (holdings heat
|
|
@@ -91,6 +92,43 @@ Every merge to `main` also attaches both tarballs to a GitHub release
|
|
|
91
92
|
- **`report.css`** for static HTML reports that do not use React: the theme as
|
|
92
93
|
plain CSS variables plus base body styles, with no network requests.
|
|
93
94
|
|
|
95
|
+
## Which component
|
|
96
|
+
|
|
97
|
+
| Need | Component |
|
|
98
|
+
| ----------------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
99
|
+
| Values over time or another ordered axis (months, hours, price buckets) | `BarChartCard`, `AreaChartCard` or `LineChartCard` |
|
|
100
|
+
| Counts or amounts per period, one series or several | `BarChartCard`; `stacked` when the series add up to a total |
|
|
101
|
+
| A running level, such as a portfolio's value against money put in | `AreaChartCard` |
|
|
102
|
+
| Series compared point by point, such as a return against an index | `LineChartCard` |
|
|
103
|
+
| Ranked counts or amounts by category (a name, a bar and a figure) | `BarList` |
|
|
104
|
+
| Headline figures with their change | `SectionCards`, with a `Delta` in each badge |
|
|
105
|
+
| One instrument's price history | `PriceChart` |
|
|
106
|
+
| Holdings sized by weight and coloured by change | `Treemap` |
|
|
107
|
+
| Activity by day, by weekday and hour, or a status over time | `CalendarHeatmap`, `WeekdayHeatmap`, `StatusHeatmap` |
|
|
108
|
+
| Rows to sort and filter | `DataTable`, inside a `Card` |
|
|
109
|
+
| A signed figure (a gain, a loss, a change) | `Delta` |
|
|
110
|
+
| A time, with the viewer's own clock on hover | `LocalTime` |
|
|
111
|
+
|
|
112
|
+
The three chart cards take the rows, the field the x axis reads and the series,
|
|
113
|
+
and own everything else: the card and its header action (a range or mode
|
|
114
|
+
toggle), the axes, the dashed horizontal grid, Geist Mono ticks, a tooltip that
|
|
115
|
+
names the hovered point and gives each series' formatted value, and the legend
|
|
116
|
+
below. A page never puts Recharts axes, grids or tooltips together itself.
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
<BarChartCard
|
|
120
|
+
title="Orders by hour"
|
|
121
|
+
data={[
|
|
122
|
+
{ hour: 9, orders: 42 },
|
|
123
|
+
{ hour: 10, orders: 31 },
|
|
124
|
+
]}
|
|
125
|
+
xKey="hour"
|
|
126
|
+
xFormatter={(hour) => `${String(hour).padStart(2, "0")}:00`}
|
|
127
|
+
series={[{ key: "orders", label: "Orders", color: "var(--chart-1)" }]}
|
|
128
|
+
height={256}
|
|
129
|
+
/>
|
|
130
|
+
```
|
|
131
|
+
|
|
94
132
|
## Locale
|
|
95
133
|
|
|
96
134
|
Numbers, money and times default to Indian English, rupees and IST:
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -8,15 +8,16 @@ file as copied; `packages/ui/registry.lock.json` lists them all and
|
|
|
8
8
|
|
|
9
9
|
## Copied into `@siyahi/ui`
|
|
10
10
|
|
|
11
|
-
| What
|
|
12
|
-
|
|
|
13
|
-
| shadcn/ui core components (installed with `shadcn add`, never edited)
|
|
14
|
-
| shadcn `tailwind.css` (variants and utilities the components use)
|
|
15
|
-
| shadcn block `sidebar-07`
|
|
16
|
-
| shadcn block `dashboard-01`, `SectionCards` only
|
|
17
|
-
| Heatmaps: calendar, weekday by hour, status timeline
|
|
18
|
-
| niko-table data table on TanStack Table
|
|
19
|
-
|
|
|
11
|
+
| What | Where in the package | Origin | Licence |
|
|
12
|
+
| ------------------------------------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
13
|
+
| shadcn/ui core components (installed with `shadcn add`, never edited) | `src/components/ui/*`, `src/hooks/use-mobile.ts` | https://github.com/shadcn-ui/ui | MIT, Copyright (c) 2023 shadcn |
|
|
14
|
+
| shadcn `tailwind.css` (variants and utilities the components use) | `styles/shadcn.css` | https://github.com/shadcn-ui/ui/tree/main/packages/shadcn | MIT, Copyright (c) 2023 shadcn |
|
|
15
|
+
| shadcn block `sidebar-07` | `src/components/registry/sidebar-07/*` | https://ui.shadcn.com/r/styles/base-vega/sidebar-07.json | MIT, Copyright (c) 2023 shadcn |
|
|
16
|
+
| shadcn block `dashboard-01`, `SectionCards` only | `src/components/registry/dashboard-01/section-cards.tsx` | https://ui.shadcn.com/r/styles/base-vega/dashboard-01.json | MIT, Copyright (c) 2023 shadcn |
|
|
17
|
+
| Heatmaps: calendar, weekday by hour, status timeline | `src/components/registry/heatmap/*` | https://shadcn-heatmap.pages.dev/r/calendar-heatmap.json, https://shadcn-heatmap.pages.dev/r/weekday-heatmap.json, https://shadcn-heatmap.pages.dev/r/status-heatmap.json (source: https://github.com/rutopio/shadcn-heatmap) | MIT, Copyright (c) 2026 ChingRu |
|
|
18
|
+
| niko-table data table on TanStack Table | `src/components/registry/niko-table/*` | https://niko-table.com/r/data-table.json, https://niko-table.com/r/data-table-core.json, https://niko-table.com/r/data-table-ui.json, https://niko-table.com/r/data-table-faceted-filter.json, https://niko-table.com/r/data-table-column-sort.json (source: https://github.com/Semkoo/niko-table-registry) | MIT, Copyright (c) 2025 Semir N.; original work Copyright (c) 2025 WebDevSimplified |
|
|
19
|
+
| shadcn chart blocks `chart-bar-multiple`, `chart-area-stacked`, `chart-line-multiple` | `src/components/registry/charts/*` | https://ui.shadcn.com/r/styles/new-york-v4/chart-bar-multiple.json, https://ui.shadcn.com/r/styles/new-york-v4/chart-area-stacked.json, https://ui.shadcn.com/r/styles/new-york-v4/chart-line-multiple.json | MIT, Copyright (c) 2023 shadcn |
|
|
20
|
+
| dashboardcn ranked list (`BarList`) | `src/components/registry/dashboardcn/bar-list.tsx` | https://dashboardcn.com/r/bar-list.json (source: https://github.com/NoahGdev/dashboardcn) | MIT, Copyright (c) 2026 dashboardcn contributors |
|
|
20
21
|
|
|
21
22
|
## Runtime dependencies with attribution terms
|
|
22
23
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SeriesChartProps } from "../../../lib/chart-series.js";
|
|
2
|
+
//#region src/components/registry/charts/area-chart-card.d.ts
|
|
3
|
+
export interface AreaChartCardProps<T extends object, K extends keyof T> extends SeriesChartProps<T, K> {
|
|
4
|
+
/** Stack the series into a total instead of overlapping them. */
|
|
5
|
+
stacked?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Values over an ordered axis as filled areas: one series, or several overlapping or stacked. */
|
|
8
|
+
export declare function AreaChartCard<T extends object, K extends keyof T>({ stacked, ...props }: AreaChartCardProps<T, K>): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ChartFrame } from "../../../lib/chart-frame.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Area, AreaChart } from "recharts";
|
|
5
|
+
//#region src/components/registry/charts/area-chart-card.tsx
|
|
6
|
+
/** Values over an ordered axis as filled areas: one series, or several overlapping or stacked. */
|
|
7
|
+
function AreaChartCard({ stacked = false, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(ChartFrame, {
|
|
9
|
+
chart: AreaChart,
|
|
10
|
+
...props,
|
|
11
|
+
children: props.series.map(({ key, color }) => /* @__PURE__ */ jsx(Area, {
|
|
12
|
+
dataKey: key,
|
|
13
|
+
type: "monotone",
|
|
14
|
+
fill: color,
|
|
15
|
+
fillOpacity: stacked ? .4 : .2,
|
|
16
|
+
stroke: color,
|
|
17
|
+
stackId: stacked ? "stack" : void 0
|
|
18
|
+
}, key))
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { AreaChartCard };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SeriesChartProps } from "../../../lib/chart-series.js";
|
|
2
|
+
//#region src/components/registry/charts/bar-chart-card.d.ts
|
|
3
|
+
export interface BarChartCardProps<T extends object, K extends keyof T> extends SeriesChartProps<T, K> {
|
|
4
|
+
/** Stack the series in one bar per point instead of side by side. */
|
|
5
|
+
stacked?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Values over an ordered axis as bars: one series, or several grouped or stacked. */
|
|
8
|
+
export declare function BarChartCard<T extends object, K extends keyof T>({ stacked, ...props }: BarChartCardProps<T, K>): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ChartFrame } from "../../../lib/chart-frame.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Bar, BarChart } from "recharts";
|
|
5
|
+
//#region src/components/registry/charts/bar-chart-card.tsx
|
|
6
|
+
/** Values over an ordered axis as bars: one series, or several grouped or stacked. */
|
|
7
|
+
function BarChartCard({ stacked = false, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(ChartFrame, {
|
|
9
|
+
chart: BarChart,
|
|
10
|
+
...props,
|
|
11
|
+
children: props.series.map(({ key, color }, index) => /* @__PURE__ */ jsx(Bar, {
|
|
12
|
+
dataKey: key,
|
|
13
|
+
fill: color,
|
|
14
|
+
stackId: stacked ? "stack" : void 0,
|
|
15
|
+
radius: !stacked ? 2 : index === props.series.length - 1 ? [
|
|
16
|
+
2,
|
|
17
|
+
2,
|
|
18
|
+
0,
|
|
19
|
+
0
|
|
20
|
+
] : 0
|
|
21
|
+
}, key))
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { BarChartCard };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SeriesChartProps } from "../../../lib/chart-series.js";
|
|
2
|
+
//#region src/components/registry/charts/line-chart-card.d.ts
|
|
3
|
+
/** Values over an ordered axis as lines: one series, or several to compare, such as a portfolio against its index. */
|
|
4
|
+
export declare function LineChartCard<T extends object, K extends keyof T>(props: SeriesChartProps<T, K>): import("react").JSX.Element;
|
|
5
|
+
//#endregion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ChartFrame } from "../../../lib/chart-frame.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Line, LineChart } from "recharts";
|
|
5
|
+
//#region src/components/registry/charts/line-chart-card.tsx
|
|
6
|
+
/** Values over an ordered axis as lines: one series, or several to compare, such as a portfolio against its index. */
|
|
7
|
+
function LineChartCard(props) {
|
|
8
|
+
return /* @__PURE__ */ jsx(ChartFrame, {
|
|
9
|
+
chart: LineChart,
|
|
10
|
+
...props,
|
|
11
|
+
children: props.series.map(({ key, color }) => /* @__PURE__ */ jsx(Line, {
|
|
12
|
+
dataKey: key,
|
|
13
|
+
type: "monotone",
|
|
14
|
+
stroke: color,
|
|
15
|
+
strokeWidth: 2,
|
|
16
|
+
dot: false
|
|
17
|
+
}, key))
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { LineChartCard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from "../../../lib/utils.js";
|
|
2
1
|
import { useLocale } from "../../siyahi/siyahi-provider.js";
|
|
2
|
+
import { cn } from "../../../lib/utils.js";
|
|
3
3
|
import { pct } from "../../../lib/format.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as React$1 from "react";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { ChartColor, ChartSeries, ChartSeriesItem, SeriesChartProps } from "./lib/chart-series.js";
|
|
2
|
+
import { AreaChartCard, AreaChartCardProps } from "./components/registry/charts/area-chart-card.js";
|
|
3
|
+
import { BarChartCard, BarChartCardProps } from "./components/registry/charts/bar-chart-card.js";
|
|
4
|
+
import { LineChartCard } from "./components/registry/charts/line-chart-card.js";
|
|
1
5
|
import { SectionCard, SectionCards } from "./components/registry/dashboard-01/section-cards.js";
|
|
2
6
|
import { BarList, BarListItem, BarListProps } from "./components/registry/dashboardcn/bar-list.js";
|
|
3
7
|
import { Activity, CalendarHeatmap, CalendarHeatmapBlock, CalendarHeatmapBlockProps, CalendarHeatmapBody, CalendarHeatmapBodyProps, CalendarHeatmapFooter, CalendarHeatmapFooterProps, CalendarHeatmapLegend, CalendarHeatmapLegendProps, CalendarHeatmapProps, CalendarHeatmapStat, CalendarHeatmapStatProps, ColorConfig, Labels } from "./components/registry/heatmap/calendar-heatmap.js";
|
|
@@ -71,4 +75,4 @@ import { Toggle, toggleVariants } from "./components/ui/toggle.js";
|
|
|
71
75
|
import { ToggleGroup, ToggleGroupItem } from "./components/ui/toggle-group.js";
|
|
72
76
|
import { Formatters, TimeOptions, money, moneyCompact, pct, time, useFormat } from "./lib/format.js";
|
|
73
77
|
import { Area, AreaChart, Bar, BarChart, CartesianGrid, Line, LineChart, ReferenceLine, XAxis, YAxis } from "./lib/recharts.js";
|
|
74
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActiveCell, ActiveSelection, Activity, Alert, AlertAction, AlertDescription, AlertTitle, AppSidebar, AppSidebarProps, Area, AreaChart, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Bar, BarChart, BarList, BarListItem, BarListProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, CalendarHeatmap, CalendarHeatmapBlock, CalendarHeatmapBlockProps, CalendarHeatmapBody, CalendarHeatmapBodyProps, CalendarHeatmapFooter, CalendarHeatmapFooterProps, CalendarHeatmapLegend, CalendarHeatmapLegendProps, CalendarHeatmapProps, CalendarHeatmapStat, CalendarHeatmapStatProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CartesianGrid, ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorConfig, ColumnResizeInfo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableActions, DataTableBody, DataTableBodyProps, type DataTableCell, type DataTableColumn, DataTableColumnActions, type DataTableColumnDef, DataTableColumnFilter, DataTableColumnHeader, DataTableColumnHeaderProps, DataTableColumnHeaderRoot, DataTableColumnSortMenu, DataTableColumnSortOptions, DataTableColumnTitle, type DataTableColumns, DataTableConfig, DataTableContainerProps, DataTableContext, DataTableContextState, DataTableEmptyActions, DataTableEmptyActionsProps, DataTableEmptyBody, DataTableEmptyBodyProps, DataTableEmptyDescription, DataTableEmptyDescriptionProps, DataTableEmptyFilteredMessage, DataTableEmptyFilteredMessageProps, DataTableEmptyIcon, DataTableEmptyIconProps, DataTableEmptyMessage, DataTableEmptyMessageProps, DataTableEmptyState, DataTableEmptyStateProps, DataTableEmptyTitle, DataTableEmptyTitleProps, DataTableErrorBoundary, DataTableErrorBoundaryProps, DataTableFacetedFilter, DataTableFacetedFilterContent, DataTableGroupRowContextValue, DataTableGroupRowProvider, DataTableGroupedRowCells, DataTableGroupedRows, DataTableGroupedRowsProps, DataTableHeader, type DataTableHeader$1 as DataTableHeaderCell, DataTableHeaderProps, type DataTableInstance, DataTableLoading, DataTableLoadingMore, DataTableLoadingMoreProps, DataTableLoadingProps, DataTableProvider, DataTableRoot, type DataTableRow, DataTableRowContextMenu, DataTableRowContextMenuProps, DataTableRowContextMenuSlot, DataTableRowContextMenuSlotProps, DataTableRowMenuScope, DataTableSkeleton, DataTableSkeletonProps, DataTableToolbarSection, DataTableToolbarSectionProps, Delta, DeltaProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type ExtendedColumnFilter, type ExtendedColumnSort, type FilterOperator, type FilterOperatorValues, type FilterVariant, type FilterVariantValues, FlashCellRef, FlashCells, FlashRows, FlashRowsOptions, Formatters, type GlobalFilter, GroupedBodyRow, GroupedBodyRowProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type JoinOperator, type JoinOperatorValues, Labels, Line, LineChart, LocalTime, LocalTimeProps, NavMain, NavProjects, NavUser, type Option, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PriceChart, PriceChartProps, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, type QueryKeys, ReferenceLine, RowMenuGroup, RowMenuItem, RowMenuLabel, RowMenuSeparator, RowMenuSub, RowMenuSubContent, RowMenuSubTrigger, ScrollAlign, ScrollArea, ScrollBar, type ScrollEvent, ScrollRowIntoView, SectionCard, SectionCards, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SiyahiLocale, SiyahiProvider, SiyahiProviderProps, Skeleton, Slider, StatusActivity, StatusColorConfig, StatusHeatmap, StatusHeatmapBlock, StatusHeatmapBlockProps, StatusHeatmapBody, StatusHeatmapBodyProps, StatusHeatmapFooter, StatusHeatmapFooterProps, StatusHeatmapLabels, StatusHeatmapLegend, StatusHeatmapLegendProps, StatusHeatmapProps, StatusHeatmapStat, StatusHeatmapStatProps, StatusValue, Table, TableBody, TableCaption, TableCell, TableColumnActions, TableColumnActionsProps, TableColumnSortMenu, TableColumnSortOptions, TableColumnTitle, TableFacetedFilter, TableFacetedFilterContent, TableFacetedFilterProps, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TeamSwitcher, Textarea, TimeOptions, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Treemap, TreemapItem, TreemapProps, type ValueOf, type ColorConfig$1 as WeekdayColorConfig, type WeekdayExtraColumnSpec, type WeekdayExtraRowSpec, WeekdayHeatmap, WeekdayHeatmapBlock, type WeekdayHeatmapBlockProps, WeekdayHeatmapBody, type WeekdayHeatmapBodyProps, WeekdayHeatmapFooter, type WeekdayHeatmapFooterProps, type WeekdayHeatmapLabels, WeekdayHeatmapLegend, type WeekdayHeatmapLegendProps, type WeekdayHeatmapProps, WeekdayHeatmapStat, type WeekdayHeatmapStatProps, type WeekdayHour, type WeekdayHourlyActivity, type WeekdayIndex, XAxis, YAxis, badgeVariants, buttonVariants, defaultLocale, flashCellKey, money, moneyCompact, pct, resolveGroupedRowsSlot, resolveRowContextMenuRenderer, tabsListVariants, time, toggleVariants, useColumnHeaderContext, useColumnResizeInfo, useDataTable, useDataTableActiveCell, useDataTableActiveCellSetter, useDataTableGroupRow, useDataTableRow, useFormat, useLocale, useResolvedRowContextMenuRenderer, useSidebar, useTableFacetedFilter };
|
|
78
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActiveCell, ActiveSelection, Activity, Alert, AlertAction, AlertDescription, AlertTitle, AppSidebar, AppSidebarProps, Area, AreaChart, AreaChartCard, AreaChartCardProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Bar, BarChart, BarChartCard, BarChartCardProps, BarList, BarListItem, BarListProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, CalendarHeatmap, CalendarHeatmapBlock, CalendarHeatmapBlockProps, CalendarHeatmapBody, CalendarHeatmapBodyProps, CalendarHeatmapFooter, CalendarHeatmapFooterProps, CalendarHeatmapLegend, CalendarHeatmapLegendProps, CalendarHeatmapProps, CalendarHeatmapStat, CalendarHeatmapStatProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CartesianGrid, ChartColor, ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartSeries, ChartSeriesItem, ChartStyle, ChartTooltip, ChartTooltipContent, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorConfig, ColumnResizeInfo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableActions, DataTableBody, DataTableBodyProps, type DataTableCell, type DataTableColumn, DataTableColumnActions, type DataTableColumnDef, DataTableColumnFilter, DataTableColumnHeader, DataTableColumnHeaderProps, DataTableColumnHeaderRoot, DataTableColumnSortMenu, DataTableColumnSortOptions, DataTableColumnTitle, type DataTableColumns, DataTableConfig, DataTableContainerProps, DataTableContext, DataTableContextState, DataTableEmptyActions, DataTableEmptyActionsProps, DataTableEmptyBody, DataTableEmptyBodyProps, DataTableEmptyDescription, DataTableEmptyDescriptionProps, DataTableEmptyFilteredMessage, DataTableEmptyFilteredMessageProps, DataTableEmptyIcon, DataTableEmptyIconProps, DataTableEmptyMessage, DataTableEmptyMessageProps, DataTableEmptyState, DataTableEmptyStateProps, DataTableEmptyTitle, DataTableEmptyTitleProps, DataTableErrorBoundary, DataTableErrorBoundaryProps, DataTableFacetedFilter, DataTableFacetedFilterContent, DataTableGroupRowContextValue, DataTableGroupRowProvider, DataTableGroupedRowCells, DataTableGroupedRows, DataTableGroupedRowsProps, DataTableHeader, type DataTableHeader$1 as DataTableHeaderCell, DataTableHeaderProps, type DataTableInstance, DataTableLoading, DataTableLoadingMore, DataTableLoadingMoreProps, DataTableLoadingProps, DataTableProvider, DataTableRoot, type DataTableRow, DataTableRowContextMenu, DataTableRowContextMenuProps, DataTableRowContextMenuSlot, DataTableRowContextMenuSlotProps, DataTableRowMenuScope, DataTableSkeleton, DataTableSkeletonProps, DataTableToolbarSection, DataTableToolbarSectionProps, Delta, DeltaProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type ExtendedColumnFilter, type ExtendedColumnSort, type FilterOperator, type FilterOperatorValues, type FilterVariant, type FilterVariantValues, FlashCellRef, FlashCells, FlashRows, FlashRowsOptions, Formatters, type GlobalFilter, GroupedBodyRow, GroupedBodyRowProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type JoinOperator, type JoinOperatorValues, Labels, Line, LineChart, LineChartCard, LocalTime, LocalTimeProps, NavMain, NavProjects, NavUser, type Option, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PriceChart, PriceChartProps, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, type QueryKeys, ReferenceLine, RowMenuGroup, RowMenuItem, RowMenuLabel, RowMenuSeparator, RowMenuSub, RowMenuSubContent, RowMenuSubTrigger, ScrollAlign, ScrollArea, ScrollBar, type ScrollEvent, ScrollRowIntoView, SectionCard, SectionCards, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesChartProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SiyahiLocale, SiyahiProvider, SiyahiProviderProps, Skeleton, Slider, StatusActivity, StatusColorConfig, StatusHeatmap, StatusHeatmapBlock, StatusHeatmapBlockProps, StatusHeatmapBody, StatusHeatmapBodyProps, StatusHeatmapFooter, StatusHeatmapFooterProps, StatusHeatmapLabels, StatusHeatmapLegend, StatusHeatmapLegendProps, StatusHeatmapProps, StatusHeatmapStat, StatusHeatmapStatProps, StatusValue, Table, TableBody, TableCaption, TableCell, TableColumnActions, TableColumnActionsProps, TableColumnSortMenu, TableColumnSortOptions, TableColumnTitle, TableFacetedFilter, TableFacetedFilterContent, TableFacetedFilterProps, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TeamSwitcher, Textarea, TimeOptions, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Treemap, TreemapItem, TreemapProps, type ValueOf, type ColorConfig$1 as WeekdayColorConfig, type WeekdayExtraColumnSpec, type WeekdayExtraRowSpec, WeekdayHeatmap, WeekdayHeatmapBlock, type WeekdayHeatmapBlockProps, WeekdayHeatmapBody, type WeekdayHeatmapBodyProps, WeekdayHeatmapFooter, type WeekdayHeatmapFooterProps, type WeekdayHeatmapLabels, WeekdayHeatmapLegend, type WeekdayHeatmapLegendProps, type WeekdayHeatmapProps, WeekdayHeatmapStat, type WeekdayHeatmapStatProps, type WeekdayHour, type WeekdayHourlyActivity, type WeekdayIndex, XAxis, YAxis, badgeVariants, buttonVariants, defaultLocale, flashCellKey, money, moneyCompact, pct, resolveGroupedRowsSlot, resolveRowContextMenuRenderer, tabsListVariants, time, toggleVariants, useColumnHeaderContext, useColumnResizeInfo, useDataTable, useDataTableActiveCell, useDataTableActiveCellSetter, useDataTableGroupRow, useDataTableRow, useFormat, useLocale, useResolvedRowContextMenuRenderer, useSidebar, useTableFacetedFilter };
|
package/dist/index.js
CHANGED
|
@@ -29,9 +29,12 @@ import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, Tabl
|
|
|
29
29
|
import { Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants } from "./components/ui/tabs.js";
|
|
30
30
|
import { Toggle, toggleVariants } from "./components/ui/toggle.js";
|
|
31
31
|
import { ToggleGroup, ToggleGroupItem } from "./components/ui/toggle-group.js";
|
|
32
|
-
import { SectionCards } from "./components/registry/dashboard-01/section-cards.js";
|
|
33
32
|
import { defaultLocale } from "./lib/locale.js";
|
|
34
33
|
import { SiyahiProvider, useLocale } from "./components/siyahi/siyahi-provider.js";
|
|
34
|
+
import { AreaChartCard } from "./components/registry/charts/area-chart-card.js";
|
|
35
|
+
import { BarChartCard } from "./components/registry/charts/bar-chart-card.js";
|
|
36
|
+
import { LineChartCard } from "./components/registry/charts/line-chart-card.js";
|
|
37
|
+
import { SectionCards } from "./components/registry/dashboard-01/section-cards.js";
|
|
35
38
|
import { money, moneyCompact, pct, time, useFormat } from "./lib/format.js";
|
|
36
39
|
import { BarList } from "./components/registry/dashboardcn/bar-list.js";
|
|
37
40
|
import { CalendarHeatmap, CalendarHeatmapBlock, CalendarHeatmapBody, CalendarHeatmapFooter, CalendarHeatmapLegend, CalendarHeatmapStat } from "./components/registry/heatmap/calendar-heatmap.js";
|
|
@@ -69,4 +72,4 @@ import { LocalTime } from "./components/siyahi/local-time.js";
|
|
|
69
72
|
import { PriceChart } from "./components/siyahi/price-chart.js";
|
|
70
73
|
import { Treemap } from "./components/siyahi/treemap.js";
|
|
71
74
|
import { Area, AreaChart, Bar, BarChart, CartesianGrid, Line, LineChart, ReferenceLine, XAxis, YAxis } from "./lib/recharts.js";
|
|
72
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertTitle, AppSidebar, Area, AreaChart, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Bar, BarChart, BarList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, CalendarHeatmap, CalendarHeatmapBlock, CalendarHeatmapBody, CalendarHeatmapFooter, CalendarHeatmapLegend, CalendarHeatmapStat, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CartesianGrid, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableActions, DataTableBody, DataTableColumnActions, DataTableColumnFilter, DataTableColumnHeader, DataTableColumnHeaderRoot, DataTableColumnSortMenu, DataTableColumnSortOptions, DataTableColumnTitle, DataTableContext, DataTableEmptyActions, DataTableEmptyBody, DataTableEmptyDescription, DataTableEmptyFilteredMessage, DataTableEmptyIcon, DataTableEmptyMessage, DataTableEmptyState, DataTableEmptyTitle, DataTableErrorBoundary, DataTableFacetedFilter, DataTableFacetedFilterContent, DataTableGroupRowProvider, DataTableGroupedRowCells, DataTableGroupedRows, DataTableHeader, DataTableLoading, DataTableLoadingMore, DataTableProvider, DataTableRoot, DataTableRowContextMenu, DataTableRowContextMenuSlot, DataTableRowMenuScope, DataTableSkeleton, DataTableToolbarSection, Delta, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, GroupedBodyRow, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Line, LineChart, LocalTime, NavMain, NavProjects, NavUser, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PriceChart, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, ReferenceLine, RowMenuGroup, RowMenuItem, RowMenuLabel, RowMenuSeparator, RowMenuSub, RowMenuSubContent, RowMenuSubTrigger, ScrollArea, ScrollBar, SectionCards, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SiyahiProvider, Skeleton, Slider, StatusHeatmap, StatusHeatmapBlock, StatusHeatmapBody, StatusHeatmapFooter, StatusHeatmapLegend, StatusHeatmapStat, Table, TableBody, TableCaption, TableCell, TableColumnActions, TableColumnSortMenu, TableColumnSortOptions, TableColumnTitle, TableFacetedFilter, TableFacetedFilterContent, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TeamSwitcher, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Treemap, WeekdayHeatmap, WeekdayHeatmapBlock, WeekdayHeatmapBody, WeekdayHeatmapFooter, WeekdayHeatmapLegend, WeekdayHeatmapStat, XAxis, YAxis, badgeVariants, buttonVariants, defaultLocale, flashCellKey, money, moneyCompact, pct, resolveGroupedRowsSlot, resolveRowContextMenuRenderer, tabsListVariants, time, toggleVariants, useColumnHeaderContext, useColumnResizeInfo, useDataTable, useDataTableActiveCell, useDataTableActiveCellSetter, useDataTableGroupRow, useDataTableRow, useFormat, useLocale, useResolvedRowContextMenuRenderer, useSidebar, useTableFacetedFilter };
|
|
75
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertTitle, AppSidebar, Area, AreaChart, AreaChartCard, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Bar, BarChart, BarChartCard, BarList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, CalendarHeatmap, CalendarHeatmapBlock, CalendarHeatmapBody, CalendarHeatmapFooter, CalendarHeatmapLegend, CalendarHeatmapStat, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CartesianGrid, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableActions, DataTableBody, DataTableColumnActions, DataTableColumnFilter, DataTableColumnHeader, DataTableColumnHeaderRoot, DataTableColumnSortMenu, DataTableColumnSortOptions, DataTableColumnTitle, DataTableContext, DataTableEmptyActions, DataTableEmptyBody, DataTableEmptyDescription, DataTableEmptyFilteredMessage, DataTableEmptyIcon, DataTableEmptyMessage, DataTableEmptyState, DataTableEmptyTitle, DataTableErrorBoundary, DataTableFacetedFilter, DataTableFacetedFilterContent, DataTableGroupRowProvider, DataTableGroupedRowCells, DataTableGroupedRows, DataTableHeader, DataTableLoading, DataTableLoadingMore, DataTableProvider, DataTableRoot, DataTableRowContextMenu, DataTableRowContextMenuSlot, DataTableRowMenuScope, DataTableSkeleton, DataTableToolbarSection, Delta, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, GroupedBodyRow, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Line, LineChart, LineChartCard, LocalTime, NavMain, NavProjects, NavUser, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PriceChart, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, ReferenceLine, RowMenuGroup, RowMenuItem, RowMenuLabel, RowMenuSeparator, RowMenuSub, RowMenuSubContent, RowMenuSubTrigger, ScrollArea, ScrollBar, SectionCards, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SiyahiProvider, Skeleton, Slider, StatusHeatmap, StatusHeatmapBlock, StatusHeatmapBody, StatusHeatmapFooter, StatusHeatmapLegend, StatusHeatmapStat, Table, TableBody, TableCaption, TableCell, TableColumnActions, TableColumnSortMenu, TableColumnSortOptions, TableColumnTitle, TableFacetedFilter, TableFacetedFilterContent, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TeamSwitcher, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Treemap, WeekdayHeatmap, WeekdayHeatmapBlock, WeekdayHeatmapBody, WeekdayHeatmapFooter, WeekdayHeatmapLegend, WeekdayHeatmapStat, XAxis, YAxis, badgeVariants, buttonVariants, defaultLocale, flashCellKey, money, moneyCompact, pct, resolveGroupedRowsSlot, resolveRowContextMenuRenderer, tabsListVariants, time, toggleVariants, useColumnHeaderContext, useColumnResizeInfo, useDataTable, useDataTableActiveCell, useDataTableActiveCellSetter, useDataTableGroupRow, useDataTableRow, useFormat, useLocale, useResolvedRowContextMenuRenderer, useSidebar, useTableFacetedFilter };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChartSeries, SeriesChartProps } from "./chart-series.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { AreaChart, BarChart, LineChart } from "recharts";
|
|
4
|
+
//#region src/lib/chart-frame.d.ts
|
|
5
|
+
interface ChartFrameProps<T extends object, K extends keyof T> extends SeriesChartProps<T, K> {
|
|
6
|
+
chart: typeof AreaChart | typeof BarChart | typeof LineChart;
|
|
7
|
+
/** One Bar, Area or Line per series. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/** A tooltip row: the series' colour and label, then its value as the page formats it, or — when the row has none. */
|
|
11
|
+
export declare function seriesRow<T>(series: ChartSeries<T>, formatValue: (value: number) => string): (value: unknown, _name: unknown, item: {
|
|
12
|
+
dataKey?: unknown;
|
|
13
|
+
}) => import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* The card, axes, grid, tooltip and legend the three chart cards share. Both
|
|
16
|
+
* axes keep Recharts' default ids: marks find their axes by id, and a page
|
|
17
|
+
* that gave its category axis its own id (dash#88) got a plot split in two
|
|
18
|
+
* and every tooltip headed with the series name instead of the category.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ChartFrame<T extends object, K extends keyof T>({ chart: Chart, children, title, description, action, data, xKey, series, xFormatter, valueFormatter, yTickFormatter, height }: ChartFrameProps<T, K>): import("react").JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from "../components/ui/card.js";
|
|
2
|
+
import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent } from "../components/ui/chart.js";
|
|
3
|
+
import { useLocale } from "../components/siyahi/siyahi-provider.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { CartesianGrid, ReferenceLine, XAxis, YAxis } from "recharts";
|
|
6
|
+
//#region src/lib/chart-frame.tsx
|
|
7
|
+
/** A tooltip row: the series' colour and label, then its value as the page formats it, or — when the row has none. */
|
|
8
|
+
function seriesRow(series, formatValue) {
|
|
9
|
+
return (value, _name, item) => {
|
|
10
|
+
const entry = series.find(({ key }) => key === item.dataKey);
|
|
11
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
|
+
/* @__PURE__ */ jsx("span", {
|
|
13
|
+
className: "size-2.5 shrink-0 rounded-xs",
|
|
14
|
+
style: { backgroundColor: entry?.color }
|
|
15
|
+
}),
|
|
16
|
+
/* @__PURE__ */ jsx("span", {
|
|
17
|
+
className: "text-muted-foreground",
|
|
18
|
+
children: entry?.label
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: "ml-auto font-mono font-medium text-foreground tabular-nums",
|
|
22
|
+
children: value == null ? "—" : formatValue(Number(value))
|
|
23
|
+
})
|
|
24
|
+
] });
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The card, axes, grid, tooltip and legend the three chart cards share. Both
|
|
29
|
+
* axes keep Recharts' default ids: marks find their axes by id, and a page
|
|
30
|
+
* that gave its category axis its own id (dash#88) got a plot split in two
|
|
31
|
+
* and every tooltip headed with the series name instead of the category.
|
|
32
|
+
*/
|
|
33
|
+
function ChartFrame({ chart: Chart, children, title, description, action, data, xKey, series, xFormatter = String, valueFormatter, yTickFormatter, height }) {
|
|
34
|
+
const { numberLocale } = useLocale();
|
|
35
|
+
const formatValue = valueFormatter ?? new Intl.NumberFormat(numberLocale).format;
|
|
36
|
+
const config = Object.fromEntries(series.map(({ key, label, color }) => [key, {
|
|
37
|
+
label,
|
|
38
|
+
color
|
|
39
|
+
}]));
|
|
40
|
+
const crossesZero = data.some((row) => series.some(({ key }) => Number(row[key]) < 0));
|
|
41
|
+
return /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
42
|
+
/* @__PURE__ */ jsx(CardTitle, { children: title }),
|
|
43
|
+
description && /* @__PURE__ */ jsx(CardDescription, { children: description }),
|
|
44
|
+
action && /* @__PURE__ */ jsx(CardAction, { children: action })
|
|
45
|
+
] }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(ChartContainer, {
|
|
46
|
+
config,
|
|
47
|
+
className: "aspect-auto w-full",
|
|
48
|
+
style: { height },
|
|
49
|
+
children: /* @__PURE__ */ jsxs(Chart, {
|
|
50
|
+
data,
|
|
51
|
+
margin: {
|
|
52
|
+
left: 0,
|
|
53
|
+
right: 8
|
|
54
|
+
},
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(CartesianGrid, {
|
|
57
|
+
vertical: false,
|
|
58
|
+
strokeDasharray: "3 3"
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsx(XAxis, {
|
|
61
|
+
dataKey: xKey,
|
|
62
|
+
tickLine: false,
|
|
63
|
+
axisLine: false,
|
|
64
|
+
tickMargin: 8,
|
|
65
|
+
tickFormatter: (value) => xFormatter(value),
|
|
66
|
+
tick: { className: "font-mono" }
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx(YAxis, {
|
|
69
|
+
tickLine: false,
|
|
70
|
+
axisLine: false,
|
|
71
|
+
width: "auto",
|
|
72
|
+
tickFormatter: yTickFormatter ?? formatValue,
|
|
73
|
+
tick: { className: "font-mono" }
|
|
74
|
+
}),
|
|
75
|
+
crossesZero && /* @__PURE__ */ jsx(ReferenceLine, {
|
|
76
|
+
y: 0,
|
|
77
|
+
stroke: "var(--border)"
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx(ChartTooltip, { content: /* @__PURE__ */ jsx(ChartTooltipContent, {
|
|
80
|
+
labelFormatter: (_, payload) => {
|
|
81
|
+
const row = payload[0]?.payload;
|
|
82
|
+
return row ? xFormatter(row[xKey]) : null;
|
|
83
|
+
},
|
|
84
|
+
formatter: seriesRow(series, formatValue)
|
|
85
|
+
}) }),
|
|
86
|
+
children,
|
|
87
|
+
/* @__PURE__ */ jsx(ChartLegend, {
|
|
88
|
+
content: /* @__PURE__ */ jsx(ChartLegendContent, {}),
|
|
89
|
+
itemSorter: null
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
})
|
|
93
|
+
}) })] });
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { ChartFrame, seriesRow };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/lib/chart-series.d.ts
|
|
3
|
+
/** The colours a series may take: the five chart slots, and muted for an "Other" past five. */
|
|
4
|
+
export type ChartColor = "var(--chart-1)" | "var(--chart-2)" | "var(--chart-3)" | "var(--chart-4)" | "var(--chart-5)" | "var(--muted-foreground)";
|
|
5
|
+
/** The fields of a row that hold numbers: the ones a series can plot. */
|
|
6
|
+
type NumericKey<T> = { [K in keyof T]-?: T[K] extends number | null | undefined ? K : never; }[keyof T] & string;
|
|
7
|
+
/** One series: the field it plots, its name in the legend and tooltip, and its colour. */
|
|
8
|
+
export interface ChartSeriesItem<T> {
|
|
9
|
+
key: NumericKey<T>;
|
|
10
|
+
label: string;
|
|
11
|
+
color: ChartColor;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The series in draw, stack and legend order; give the slots in order from
|
|
15
|
+
* --chart-1. A list, not an object keyed by field, because an object puts
|
|
16
|
+
* number-like keys such as "2024" first whatever order the page wrote them in.
|
|
17
|
+
*/
|
|
18
|
+
export type ChartSeries<T> = readonly ChartSeriesItem<T>[];
|
|
19
|
+
/** What BarChartCard, AreaChartCard and LineChartCard all take. */
|
|
20
|
+
export interface SeriesChartProps<T extends object, K extends keyof T> {
|
|
21
|
+
title: ReactNode;
|
|
22
|
+
description?: ReactNode;
|
|
23
|
+
/** A range or mode toggle, top right of the card. */
|
|
24
|
+
action?: ReactNode;
|
|
25
|
+
/** One row per point on the axis, in axis order. */
|
|
26
|
+
data: T[];
|
|
27
|
+
/** The field the x axis reads: a month, an hour of day, a price bucket. One row per value; a repeated value is hidden behind the first. */
|
|
28
|
+
xKey: K;
|
|
29
|
+
series: ChartSeries<NoInfer<T>>;
|
|
30
|
+
/** The x axis ticks and the tooltip's heading. Defaults to the value as text. */
|
|
31
|
+
xFormatter?: (value: T[K]) => string;
|
|
32
|
+
/** A series' value in the tooltip, and the y axis unless yTickFormatter is set. Defaults to the locale's numbers. */
|
|
33
|
+
valueFormatter?: (value: number) => string;
|
|
34
|
+
/** The y axis, when its ticks should be shorter than the tooltip's figures: moneyCompact against money. */
|
|
35
|
+
yTickFormatter?: (value: number) => string;
|
|
36
|
+
/** Height of the plot and legend, in pixels. */
|
|
37
|
+
height: number;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export {};
|
|
File without changes
|
package/package.json
CHANGED
package/registry.lock.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generatedBy": "packages/ui/scripts/generate.ts",
|
|
3
3
|
"items": [
|
|
4
|
+
{
|
|
5
|
+
"file": "src/components/registry/charts/area-chart-card.tsx",
|
|
6
|
+
"registry": "@shadcn/chart-area-stacked",
|
|
7
|
+
"origin": "https://ui.shadcn.com/r/styles/new-york-v4/chart-area-stacked.json",
|
|
8
|
+
"licence": "MIT, Copyright (c) 2023 shadcn, https://github.com/shadcn-ui/ui/blob/main/LICENSE.md",
|
|
9
|
+
"copied": "2026-10-21",
|
|
10
|
+
"sha256": "d65dbe0690431811cfb4c1117506b6ff4c411eb65db70c29c97cca1030abb0b5"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"file": "src/components/registry/charts/bar-chart-card.tsx",
|
|
14
|
+
"registry": "@shadcn/chart-bar-multiple",
|
|
15
|
+
"origin": "https://ui.shadcn.com/r/styles/new-york-v4/chart-bar-multiple.json",
|
|
16
|
+
"licence": "MIT, Copyright (c) 2023 shadcn, https://github.com/shadcn-ui/ui/blob/main/LICENSE.md",
|
|
17
|
+
"copied": "2026-10-21",
|
|
18
|
+
"sha256": "46fbdcf8c66b0def3836211e4e186eb3777b3daaca3b09dc6f94eb82ccc86309"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"file": "src/components/registry/charts/line-chart-card.tsx",
|
|
22
|
+
"registry": "@shadcn/chart-line-multiple",
|
|
23
|
+
"origin": "https://ui.shadcn.com/r/styles/new-york-v4/chart-line-multiple.json",
|
|
24
|
+
"licence": "MIT, Copyright (c) 2023 shadcn, https://github.com/shadcn-ui/ui/blob/main/LICENSE.md",
|
|
25
|
+
"copied": "2026-10-21",
|
|
26
|
+
"sha256": "20c708ac3e313e275a84119970b6046142f24c869a9355caec5483aa4feb6ddd"
|
|
27
|
+
},
|
|
4
28
|
{
|
|
5
29
|
"file": "src/components/registry/dashboard-01/section-cards.tsx",
|
|
6
30
|
"registry": "@shadcn/dashboard-01",
|