@siyahi/ui 0.1.9-next.20 → 0.1.9-next.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/DESIGN.md +30 -0
  2. package/README.md +3 -3
  3. package/agents/examples/alert.tsx +4 -6
  4. package/agents/examples/bar-list-sides.tsx +11 -3
  5. package/agents/examples/button-states.tsx +23 -0
  6. package/agents/examples/callout.tsx +33 -0
  7. package/agents/examples/change-bar.tsx +104 -0
  8. package/agents/examples/chart-area.tsx +5 -4
  9. package/agents/examples/chart-bar-flows.tsx +3 -2
  10. package/agents/examples/chart-bar-sectors.tsx +2 -0
  11. package/agents/examples/data-table-compact.tsx +95 -0
  12. package/agents/examples/heatmap-calendar.tsx +17 -7
  13. package/agents/examples/heatmap-status.tsx +17 -11
  14. package/agents/examples/heatmap-weekday.tsx +33 -11
  15. package/agents/examples/input-states.tsx +33 -0
  16. package/agents/examples/metric-strip.tsx +9 -3
  17. package/agents/examples/overview-dashboard.tsx +18 -0
  18. package/agents/examples/page-hero.tsx +38 -0
  19. package/agents/examples/range-position-table.tsx +101 -0
  20. package/agents/examples/range-position.tsx +53 -0
  21. package/agents/examples/section-cards-select.tsx +8 -5
  22. package/agents/examples/surfaces.tsx +3 -2
  23. package/agents/examples/target-rows.tsx +70 -0
  24. package/agents/examples/treemap.tsx +2 -1
  25. package/agents/manifest.json +153 -3
  26. package/dist/components/registry/charts/area-chart-card.js +25 -7
  27. package/dist/components/registry/charts/bar-chart-card.d.ts +0 -1
  28. package/dist/components/registry/charts/bar-chart-card.js +11 -4
  29. package/dist/components/registry/charts/line-chart-card.js +2 -2
  30. package/dist/components/registry/dashboardcn/bar-list.js +11 -5
  31. package/dist/components/registry/dashboardcn/kpi-row-card.js +2 -2
  32. package/dist/components/registry/dashboardcn/sparkline.d.ts +5 -1
  33. package/dist/components/registry/dashboardcn/sparkline.js +40 -18
  34. package/dist/components/registry/heatmap/calendar-heatmap.d.ts +4 -2
  35. package/dist/components/registry/heatmap/calendar-heatmap.js +67 -33
  36. package/dist/components/registry/heatmap/status-heatmap.d.ts +5 -3
  37. package/dist/components/registry/heatmap/status-heatmap.js +30 -15
  38. package/dist/components/registry/heatmap/weekday-heatmap.d.ts +4 -2
  39. package/dist/components/registry/heatmap/weekday-heatmap.js +28 -12
  40. package/dist/components/registry/niko-table/core/data-table-context.d.ts +16 -1
  41. package/dist/components/registry/niko-table/core/data-table-context.js +5 -20
  42. package/dist/components/registry/niko-table/core/data-table-root.js +39 -4
  43. package/dist/components/registry/niko-table/core/data-table-structure.js +2 -0
  44. package/dist/components/registry/niko-table/lib/styles.js +1 -1
  45. package/dist/components/registry/niko-table/types/index.d.ts +9 -0
  46. package/dist/components/registry/sidebar-07/nav-main.d.ts +1 -0
  47. package/dist/components/registry/sidebar-07/nav-main.js +9 -2
  48. package/dist/components/siyahi/callout.d.ts +24 -0
  49. package/dist/components/siyahi/callout.js +40 -0
  50. package/dist/components/siyahi/change-bar.d.ts +21 -0
  51. package/dist/components/siyahi/change-bar.js +35 -0
  52. package/dist/components/siyahi/data-table-compact-columns-toggle.d.ts +4 -0
  53. package/dist/components/siyahi/data-table-compact-columns-toggle.js +19 -0
  54. package/dist/components/siyahi/data-table-footnote.d.ts +12 -0
  55. package/dist/components/siyahi/data-table-footnote.js +35 -0
  56. package/dist/components/siyahi/default-sidebar-open.d.ts +8 -0
  57. package/dist/components/siyahi/default-sidebar-open.js +13 -0
  58. package/dist/components/siyahi/page-hero.d.ts +25 -0
  59. package/dist/components/siyahi/page-hero.js +41 -0
  60. package/dist/components/siyahi/page-toc.d.ts +20 -0
  61. package/dist/components/siyahi/page-toc.js +76 -0
  62. package/dist/components/siyahi/quote.d.ts +12 -0
  63. package/dist/components/siyahi/quote.js +23 -0
  64. package/dist/components/siyahi/range-position.d.ts +24 -0
  65. package/dist/components/siyahi/range-position.js +105 -0
  66. package/dist/components/siyahi/siyahi-provider.d.ts +1 -1
  67. package/dist/components/siyahi/siyahi-provider.js +1 -1
  68. package/dist/components/siyahi/target-rows.d.ts +34 -0
  69. package/dist/components/siyahi/target-rows.js +97 -0
  70. package/dist/components/siyahi/treemap.d.ts +4 -1
  71. package/dist/components/siyahi/treemap.js +33 -25
  72. package/dist/components/siyahi/warning-alert.d.ts +10 -0
  73. package/dist/components/siyahi/warning-alert.js +20 -0
  74. package/dist/index.d.ts +15 -4
  75. package/dist/index.js +12 -1
  76. package/dist/lib/chart-frame.d.ts +12 -2
  77. package/dist/lib/chart-frame.js +51 -7
  78. package/dist/lib/chart-series.d.ts +5 -2
  79. package/dist/lib/compact-columns.d.ts +19 -0
  80. package/dist/lib/compact-columns.js +55 -0
  81. package/dist/lib/format.d.ts +7 -2
  82. package/dist/lib/format.js +24 -5
  83. package/dist/lib/treemap.js +6 -1
  84. package/dist/lib/use-element-width.d.ts +5 -0
  85. package/dist/lib/use-element-width.js +15 -0
  86. package/package.json +2 -1
  87. package/report.css +26 -25
  88. package/styles/siyahi.css +159 -43
@@ -0,0 +1,18 @@
1
+ import ChartArea from "./chart-area";
2
+ import DataTableExample from "./data-table";
3
+ import MetricStrip from "./metric-strip";
4
+
5
+ // What a page built with Siyahi looks like: a metric strip, a chart card and a data table, each the catalogue's own example.
6
+ export default function OverviewDashboard() {
7
+ return (
8
+ <div className="flex flex-col gap-4">
9
+ <MetricStrip />
10
+ {/* Side by side only where the table's five columns fit beside the chart; at 1440 they would be cut off.
11
+ Each card keeps its own height: stretched to the taller one, the chart card ends in blank space. */}
12
+ <div className="grid items-start gap-4 2xl:grid-cols-2">
13
+ <ChartArea />
14
+ <DataTableExample />
15
+ </div>
16
+ </div>
17
+ );
18
+ }
@@ -0,0 +1,38 @@
1
+ import { Button, PageHero } from "@siyahi/ui";
2
+ import { ArrowRightIcon } from "lucide-react";
3
+
4
+ // The catalogue's own ink drop, painted with currentColor so the hero tints it.
5
+ function InkDrop() {
6
+ return (
7
+ <svg viewBox="0 0 16 16">
8
+ <path
9
+ fill="currentColor"
10
+ fillRule="evenodd"
11
+ d="M8 .5C8 .5 2.5 6.3 2.5 10a5.5 5.5 0 0 0 11 0C13.5 6.3 8 .5 8 .5ZM4.75 10A3.25 3.25 0 0 0 8 13.25v-1.5A1.75 1.75 0 0 1 6.25 10Z"
12
+ />
13
+ </svg>
14
+ );
15
+ }
16
+
17
+ export default function PageHeroExample() {
18
+ return (
19
+ <PageHero
20
+ eyebrow="@siyahi/ui"
21
+ title="Siyahi"
22
+ lead="Ink for numbers. A design system for pages people read figures from: portfolios, ledgers, research."
23
+ detail="Stock shadcn/ui on Base UI and Tailwind v4, with a finance theme, charts and tables that fit a phone, Indian-aware formatters and a lint. Siyahi is Hindi for ink."
24
+ actions={
25
+ <>
26
+ <Button nativeButton={false} render={<a href="#/data" />}>
27
+ Browse the data components
28
+ <ArrowRightIcon />
29
+ </Button>
30
+ <Button variant="outline" nativeButton={false} render={<a href="#/overview/install" />}>
31
+ Install
32
+ </Button>
33
+ </>
34
+ }
35
+ mark={<InkDrop />}
36
+ />
37
+ );
38
+ }
@@ -0,0 +1,101 @@
1
+ import {
2
+ Card,
3
+ CardContent,
4
+ CardDescription,
5
+ CardHeader,
6
+ CardTitle,
7
+ DataTable,
8
+ DataTableBody,
9
+ DataTableCompactColumnsToggle,
10
+ DataTableHeader,
11
+ DataTableRoot,
12
+ DataTableSortHeader,
13
+ DataTableToolbarSection,
14
+ RangePosition,
15
+ useFormat,
16
+ type DataTableColumnDef,
17
+ } from "@siyahi/ui";
18
+
19
+ interface Holding {
20
+ symbol: string;
21
+ /** Last close and the 52-week low and high closes, in rupees; made-up figures. */
22
+ close: number;
23
+ low: number;
24
+ high: number;
25
+ /** How far up its range the close sits, 0 at the low and 1 at the high, so the column sorts. */
26
+ position: number;
27
+ }
28
+
29
+ const holding = (symbol: string, close: number, low: number, high: number): Holding => ({
30
+ symbol,
31
+ close,
32
+ low,
33
+ high,
34
+ position: (close - low) / (high - low),
35
+ });
36
+
37
+ const holdings: Holding[] = [
38
+ holding("NIFTYBEES", 284, 241.2, 291.8),
39
+ holding("INFY", 1870, 1307, 2006.45),
40
+ holding("ICICIBANK", 1290, 1051.05, 1362.35),
41
+ holding("TCS", 4150, 3591.5, 4592.25),
42
+ holding("ITC", 460, 399.35, 528.5),
43
+ holding("HDFCBANK", 1750, 1613.6, 2027.4),
44
+ ];
45
+
46
+ function Price({ amount }: { amount: number }) {
47
+ return useFormat().money(amount, 2);
48
+ }
49
+
50
+ const header = () => <DataTableSortHeader />;
51
+
52
+ const columns: DataTableColumnDef<Holding>[] = [
53
+ { accessorKey: "symbol", header, size: 130, meta: { label: "Symbol", compact: true } },
54
+ {
55
+ accessorKey: "close",
56
+ header,
57
+ size: 120,
58
+ meta: { label: "Close", variant: "number" },
59
+ cell: ({ row }) => <Price amount={row.original.close} />,
60
+ },
61
+ {
62
+ accessorKey: "position",
63
+ header,
64
+ size: 200,
65
+ meta: { label: "52-week range", compact: true },
66
+ cell: ({ row }) => (
67
+ <RangePosition
68
+ variant="compact"
69
+ low={row.original.low}
70
+ high={row.original.high}
71
+ value={row.original.close}
72
+ lowLabel="52-week low"
73
+ highLabel="52-week high"
74
+ />
75
+ ),
76
+ },
77
+ ];
78
+
79
+ export default function RangePositionTableExample() {
80
+ return (
81
+ <Card>
82
+ <CardHeader>
83
+ <CardTitle>NIFTYBEES trades near its 52-week high, HDFCBANK near its low</CardTitle>
84
+ <CardDescription>
85
+ Each close on a track from the year's low close to its high; sort to rank them
86
+ </CardDescription>
87
+ </CardHeader>
88
+ <CardContent>
89
+ <DataTableRoot data={holdings} columns={columns}>
90
+ <DataTableToolbarSection>
91
+ <DataTableCompactColumnsToggle />
92
+ </DataTableToolbarSection>
93
+ <DataTable aria-label="Holdings in their 52-week range">
94
+ <DataTableHeader />
95
+ <DataTableBody />
96
+ </DataTable>
97
+ </DataTableRoot>
98
+ </CardContent>
99
+ </Card>
100
+ );
101
+ }
@@ -0,0 +1,53 @@
1
+ import {
2
+ Card,
3
+ CardContent,
4
+ CardDescription,
5
+ CardHeader,
6
+ CardTitle,
7
+ DataList,
8
+ DataListItem,
9
+ RangePosition,
10
+ useFormat,
11
+ } from "@siyahi/ui";
12
+
13
+ // HDFCBANK over the last 52 weeks; made-up figures.
14
+ const low = 1613.6;
15
+ const high = 2027.4;
16
+ const close = 1750.0;
17
+
18
+ export default function RangePositionExample() {
19
+ const f = useFormat();
20
+ const price = (value: number) => f.money(value, 2);
21
+ return (
22
+ // Side by side once the card, not the screen, has room: in a narrow panel on a wide screen they stack.
23
+ <Card className="@container/range">
24
+ <CardHeader>
25
+ <CardTitle>HDFCBANK sits {f.pct((close - low) / (high - low), 0)} of the way up its 52-week range</CardTitle>
26
+ <CardDescription>The last close against the year's lowest and highest close</CardDescription>
27
+ </CardHeader>
28
+ <CardContent className="flex flex-col gap-8 @xl/range:flex-row @xl/range:items-end">
29
+ <DataList className="@xl/range:w-56 @xl/range:shrink-0">
30
+ <DataListItem label="52-week low, 7 months ago">
31
+ <span className="tabular-nums">{price(low)}</span>
32
+ </DataListItem>
33
+ <DataListItem label="52-week high, 11 weeks ago">
34
+ <span className="tabular-nums">{price(high)}</span>
35
+ </DataListItem>
36
+ <DataListItem label="Last close">
37
+ <span className="tabular-nums">{price(close)}</span>
38
+ </DataListItem>
39
+ </DataList>
40
+ <RangePosition
41
+ low={low}
42
+ high={high}
43
+ value={close}
44
+ lowLabel="52-week low"
45
+ highLabel="52-week high"
46
+ caption="of the way up the 52-week range"
47
+ valueFormatter={price}
48
+ className="@xl/range:flex-1"
49
+ />
50
+ </CardContent>
51
+ </Card>
52
+ );
53
+ }
@@ -1,4 +1,4 @@
1
- import { Delta, SectionCards, useFormat, type SectionCard } from "@siyahi/ui";
1
+ import { Delta, SectionCards, SiyahiProvider, useFormat, type SectionCard } from "@siyahi/ui";
2
2
  import { useState } from "react";
3
3
 
4
4
  const classes = [
@@ -19,9 +19,12 @@ export default function SectionCardsSelectExample() {
19
19
  disabled: c.positions === 0,
20
20
  }));
21
21
  return (
22
- <div className="flex flex-col gap-3">
23
- <SectionCards items={items} selected={scope} onSelect={setScope} />
24
- <p className="text-sm text-muted-foreground">Showing {scope}</p>
25
- </div>
22
+ // On a ruled surface the tiles part with hairlines, as on a trading screen, instead of sitting as cards.
23
+ <SiyahiProvider surface="ruled">
24
+ <div className="flex flex-col gap-3">
25
+ <SectionCards items={items} selected={scope} onSelect={setScope} />
26
+ <p className="text-sm text-muted-foreground">Showing {scope}</p>
27
+ </div>
28
+ </SiyahiProvider>
26
29
  );
27
30
  }
@@ -89,7 +89,7 @@ function Dashboard() {
89
89
  }
90
90
 
91
91
  export default function SurfacesExample() {
92
- const [surface, setSurface] = useState<Surface>("ruled");
92
+ const [surface, setSurface] = useState<Surface>("card");
93
93
  return (
94
94
  <div className="flex flex-col gap-4">
95
95
  <ToggleGroup
@@ -102,9 +102,10 @@ export default function SurfacesExample() {
102
102
  size="sm"
103
103
  aria-label="Surface"
104
104
  >
105
+ {/* The default first. */}
106
+ <ToggleGroupItem value="card">Card</ToggleGroupItem>
105
107
  <ToggleGroupItem value="ruled">Ruled</ToggleGroupItem>
106
108
  <ToggleGroupItem value="open">Open</ToggleGroupItem>
107
- <ToggleGroupItem value="card">Card</ToggleGroupItem>
108
109
  </ToggleGroup>
109
110
  {/* A nested provider sets the surface for its part of the page. */}
110
111
  <SiyahiProvider surface={surface}>
@@ -0,0 +1,70 @@
1
+ import {
2
+ Card,
3
+ CardContent,
4
+ CardDescription,
5
+ CardHeader,
6
+ CardTitle,
7
+ TargetRows,
8
+ useFormat,
9
+ type TargetRow,
10
+ type TargetStatus,
11
+ } from "@siyahi/ui";
12
+
13
+ interface Sleeve {
14
+ name: string;
15
+ holdings: string;
16
+ /** Today's share of the portfolio and the plan's share, as fractions; made-up figures. */
17
+ weight: number;
18
+ target: number;
19
+ }
20
+
21
+ const sleeves: Sleeve[] = [
22
+ { name: "Large-cap equity", holdings: "HDFCBANK, ICICIBANK, INFY, TCS", weight: 0.426, target: 0.4 },
23
+ { name: "Mid and small cap", holdings: "Two mid-cap funds", weight: 0.189, target: 0.2 },
24
+ { name: "Debt", holdings: "Corporate bond fund, PPF", weight: 0.194, target: 0.25 },
25
+ { name: "Gold", holdings: "GOLDBEES, Sovereign Gold Bonds", weight: 0.093, target: 0.1 },
26
+ { name: "International", holdings: "Nasdaq 100 fund of funds", weight: 0.098, target: 0.05 },
27
+ ];
28
+
29
+ // Within two points of the plan is on target; past five is far enough to rebalance.
30
+ const NEAR = 0.02;
31
+ const FAR = 0.05;
32
+
33
+ const pts = (value: number) => `${(value * 100).toFixed(1)} pts`;
34
+
35
+ function statusOf({ weight, target }: Sleeve): TargetStatus {
36
+ const gap = weight - target;
37
+ const size = `${pts(Math.abs(gap))} ${gap > 0 ? "over" : "under"}`;
38
+ if (Math.abs(gap) <= NEAR) return { kind: "met", label: "On target" };
39
+ if (Math.abs(gap) <= FAR) return { kind: "missed", label: size };
40
+ return { kind: "warning", label: `${size}, rebalance` };
41
+ }
42
+
43
+ export default function TargetRowsExample() {
44
+ const f = useFormat();
45
+ const rows: TargetRow[] = sleeves.map((sleeve) => ({
46
+ label: sleeve.name,
47
+ detail: sleeve.holdings,
48
+ value: sleeve.weight,
49
+ target: sleeve.target,
50
+ bands: [
51
+ [sleeve.target - FAR, sleeve.target + FAR],
52
+ [sleeve.target - NEAR, sleeve.target + NEAR],
53
+ ],
54
+ status: statusOf(sleeve),
55
+ }));
56
+ return (
57
+ <Card>
58
+ <CardHeader>
59
+ <CardTitle>Debt is 5.6 points under its target</CardTitle>
60
+ <CardDescription>Each sleeve's share of the portfolio against the plan, on one 0–50% scale</CardDescription>
61
+ </CardHeader>
62
+ <CardContent className="grid gap-2">
63
+ <p className="text-sm text-muted-foreground">
64
+ Bar: today's weight. Tall tick: the target. Shading: within 5 points of it, darker within 2.
65
+ </p>
66
+ <TargetRows rows={rows} domain={[0, 0.5]} valueFormatter={(value) => f.pct(value)} />
67
+ </CardContent>
68
+ </Card>
69
+ );
70
+ }
@@ -63,6 +63,7 @@ export default function TreemapExample() {
63
63
  <span className="font-medium">
64
64
  {hovered.name} · {hovered.broker}
65
65
  </span>
66
+ <span>{hovered.group}</span>
66
67
  <span>{figures(hovered)}</span>
67
68
  </>
68
69
  )}
@@ -75,7 +76,7 @@ export default function TreemapExample() {
75
76
  <span className="font-medium">
76
77
  {selected.name} · {selected.broker}
77
78
  </span>{" "}
78
- · {figures(selected)}
79
+ · {selected.group} · {figures(selected)}
79
80
  </>
80
81
  ) : (
81
82
  <span className="text-muted-foreground">Tap a tile for its figures</span>
@@ -108,6 +108,29 @@
108
108
  "DataBar"
109
109
  ]
110
110
  },
111
+ {
112
+ "need": "A table column of changes that should rank by eye, and a note on how to read the table",
113
+ "guidance": "`ChangeBar` in the column's cell, `diverging` when it holds both signs; `DataTableFootnote` after `DataTableBody`",
114
+ "components": [
115
+ "ChangeBar",
116
+ "DataTableFootnote",
117
+ "DataTableBody"
118
+ ]
119
+ },
120
+ {
121
+ "need": "Figures against their targets, such as allocation against plan",
122
+ "guidance": "`TargetRows`, with neutral `bands` and a `status` per row",
123
+ "components": [
124
+ "TargetRows"
125
+ ]
126
+ },
127
+ {
128
+ "need": "Where a value sits in its range, such as a price in its 52-week range",
129
+ "guidance": "`RangePosition`; `variant=\"compact\"` in a table cell",
130
+ "components": [
131
+ "RangePosition"
132
+ ]
133
+ },
111
134
  {
112
135
  "need": "One instrument's price history",
113
136
  "guidance": "`PriceChart`",
@@ -283,7 +306,8 @@
283
306
  "components": [
284
307
  "Alert",
285
308
  "AlertDescription",
286
- "AlertTitle"
309
+ "AlertTitle",
310
+ "WarningAlert"
287
311
  ]
288
312
  },
289
313
  {
@@ -355,6 +379,13 @@
355
379
  "BreadcrumbSeparator"
356
380
  ]
357
381
  },
382
+ {
383
+ "file": "agents/examples/button-states.tsx",
384
+ "components": [
385
+ "Button",
386
+ "Toggle"
387
+ ]
388
+ },
358
389
  {
359
390
  "file": "agents/examples/button.tsx",
360
391
  "components": [
@@ -367,6 +398,16 @@
367
398
  "Calendar"
368
399
  ]
369
400
  },
401
+ {
402
+ "file": "agents/examples/callout.tsx",
403
+ "components": [
404
+ "Callout",
405
+ "Quote",
406
+ "WarningAlert",
407
+ "AlertDescription",
408
+ "AlertTitle"
409
+ ]
410
+ },
370
411
  {
371
412
  "file": "agents/examples/card.tsx",
372
413
  "components": [
@@ -381,6 +422,26 @@
381
422
  "useFormat"
382
423
  ]
383
424
  },
425
+ {
426
+ "file": "agents/examples/change-bar.tsx",
427
+ "components": [
428
+ "Card",
429
+ "CardContent",
430
+ "CardDescription",
431
+ "CardHeader",
432
+ "CardTitle",
433
+ "ChangeBar",
434
+ "DataTable",
435
+ "DataTableBody",
436
+ "DataTableCompactColumnsToggle",
437
+ "DataTableFootnote",
438
+ "DataTableHeader",
439
+ "DataTableRoot",
440
+ "DataTableSortHeader",
441
+ "DataTableToolbarSection",
442
+ "useFormat"
443
+ ]
444
+ },
384
445
  {
385
446
  "file": "agents/examples/chart-area.tsx",
386
447
  "components": [
@@ -528,6 +589,27 @@
528
589
  "useFormat"
529
590
  ]
530
591
  },
592
+ {
593
+ "file": "agents/examples/data-table-compact.tsx",
594
+ "components": [
595
+ "Card",
596
+ "CardContent",
597
+ "CardDescription",
598
+ "CardHeader",
599
+ "CardTitle",
600
+ "DataTable",
601
+ "DataTableBody",
602
+ "DataTableCompactColumnsToggle",
603
+ "DataTableHeader",
604
+ "DataTableRoot",
605
+ "DataTableRowCount",
606
+ "DataTableSortHeader",
607
+ "DataTableToolbarSection",
608
+ "Delta",
609
+ "useDataTable",
610
+ "useFormat"
611
+ ]
612
+ },
531
613
  {
532
614
  "file": "agents/examples/data-table-filters.tsx",
533
615
  "components": [
@@ -654,6 +736,8 @@
654
736
  "CalendarHeatmap",
655
737
  "CalendarHeatmapBlock",
656
738
  "CalendarHeatmapBody",
739
+ "CalendarHeatmapFooter",
740
+ "CalendarHeatmapLegend",
657
741
  "useFormat",
658
742
  "Card",
659
743
  "CardContent",
@@ -672,7 +756,9 @@
672
756
  "CardTitle",
673
757
  "StatusHeatmap",
674
758
  "StatusHeatmapBlock",
675
- "StatusHeatmapBody"
759
+ "StatusHeatmapBody",
760
+ "StatusHeatmapFooter",
761
+ "StatusHeatmapLegend"
676
762
  ]
677
763
  },
678
764
  {
@@ -686,7 +772,14 @@
686
772
  "CardTitle",
687
773
  "WeekdayHeatmap",
688
774
  "WeekdayHeatmapBlock",
689
- "WeekdayHeatmapBody"
775
+ "WeekdayHeatmapBody",
776
+ "WeekdayHeatmapLegend"
777
+ ]
778
+ },
779
+ {
780
+ "file": "agents/examples/input-states.tsx",
781
+ "components": [
782
+ "Input"
690
783
  ]
691
784
  },
692
785
  {
@@ -714,6 +807,17 @@
714
807
  "useFormat"
715
808
  ]
716
809
  },
810
+ {
811
+ "file": "agents/examples/overview-dashboard.tsx",
812
+ "components": []
813
+ },
814
+ {
815
+ "file": "agents/examples/page-hero.tsx",
816
+ "components": [
817
+ "Button",
818
+ "PageHero"
819
+ ]
820
+ },
717
821
  {
718
822
  "file": "agents/examples/page-section.tsx",
719
823
  "components": [
@@ -768,6 +872,39 @@
768
872
  "ProgressValue"
769
873
  ]
770
874
  },
875
+ {
876
+ "file": "agents/examples/range-position-table.tsx",
877
+ "components": [
878
+ "Card",
879
+ "CardContent",
880
+ "CardDescription",
881
+ "CardHeader",
882
+ "CardTitle",
883
+ "DataTable",
884
+ "DataTableBody",
885
+ "DataTableCompactColumnsToggle",
886
+ "DataTableHeader",
887
+ "DataTableRoot",
888
+ "DataTableSortHeader",
889
+ "DataTableToolbarSection",
890
+ "RangePosition",
891
+ "useFormat"
892
+ ]
893
+ },
894
+ {
895
+ "file": "agents/examples/range-position.tsx",
896
+ "components": [
897
+ "Card",
898
+ "CardContent",
899
+ "CardDescription",
900
+ "CardHeader",
901
+ "CardTitle",
902
+ "DataList",
903
+ "DataListItem",
904
+ "RangePosition",
905
+ "useFormat"
906
+ ]
907
+ },
771
908
  {
772
909
  "file": "agents/examples/scroll-area.tsx",
773
910
  "components": [
@@ -780,6 +917,7 @@
780
917
  "components": [
781
918
  "Delta",
782
919
  "SectionCards",
920
+ "SiyahiProvider",
783
921
  "useFormat"
784
922
  ]
785
923
  },
@@ -889,6 +1027,18 @@
889
1027
  "TabsTrigger"
890
1028
  ]
891
1029
  },
1030
+ {
1031
+ "file": "agents/examples/target-rows.tsx",
1032
+ "components": [
1033
+ "Card",
1034
+ "CardContent",
1035
+ "CardDescription",
1036
+ "CardHeader",
1037
+ "CardTitle",
1038
+ "TargetRows",
1039
+ "useFormat"
1040
+ ]
1041
+ },
892
1042
  {
893
1043
  "file": "agents/examples/toggle-group.tsx",
894
1044
  "components": [
@@ -1,21 +1,39 @@
1
1
  "use client";
2
- import { ChartFrame } from "../../../lib/chart-frame.js";
3
- import { jsx } from "react/jsx-runtime";
2
+ import { ChartFrame, endDot } from "../../../lib/chart-frame.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { useId } from "react";
4
5
  import { Area, AreaChart } from "recharts";
5
6
  //#region src/components/registry/charts/area-chart-card.tsx
6
7
  /** Values over an ordered axis as filled areas: one series, or several overlapping or stacked. */
7
8
  function AreaChartCard({ stacked = false, curve = "monotone", ...props }) {
8
- return /* @__PURE__ */ jsx(ChartFrame, {
9
+ const id = useId();
10
+ return /* @__PURE__ */ jsxs(ChartFrame, {
9
11
  chart: AreaChart,
10
12
  ...props,
11
- children: props.series.map(({ key, color }) => /* @__PURE__ */ jsx(Area, {
13
+ children: [/* @__PURE__ */ jsx("defs", { children: props.series.map(({ key, color }, index) => /* @__PURE__ */ jsxs("linearGradient", {
14
+ id: `${id}-${index}`,
15
+ x1: "0",
16
+ y1: "0",
17
+ x2: "0",
18
+ y2: "1",
19
+ children: [/* @__PURE__ */ jsx("stop", {
20
+ offset: "0%",
21
+ stopColor: color,
22
+ stopOpacity: stacked ? .5 : .32
23
+ }), /* @__PURE__ */ jsx("stop", {
24
+ offset: "100%",
25
+ stopColor: color,
26
+ stopOpacity: stacked ? .15 : .02
27
+ })]
28
+ }, key)) }), props.series.map(({ key, color }, index) => /* @__PURE__ */ jsx(Area, {
12
29
  dataKey: key,
13
30
  type: curve,
14
- fill: color,
15
- fillOpacity: stacked ? .4 : .2,
31
+ fill: stacked || index === 0 ? `url(#${id}-${index})` : "none",
16
32
  stroke: color,
33
+ strokeWidth: 2,
34
+ dot: endDot(color, props.data.length),
17
35
  stackId: stacked ? "stack" : void 0
18
- }, key))
36
+ }, key))]
19
37
  });
20
38
  }
21
39
  //#endregion
@@ -10,6 +10,5 @@ export interface BarChartCardProps<T extends object, K extends keyof T> extends
10
10
  /** Called with a clicked category's x value, or null when the picked one is clicked again. */
11
11
  onSelect?: (value: T[K] | null) => void;
12
12
  }
13
- /** Values over an ordered axis as bars: one series, or several grouped or stacked. */
14
13
  export declare function BarChartCard<T extends object, K extends keyof T>({ stacked, selected, onSelect, ...props }: BarChartCardProps<T, K>): import("react").JSX.Element;
15
14
  //#endregion
@@ -5,6 +5,8 @@ import { Bar, BarChart, Cell } from "recharts";
5
5
  //#region src/components/registry/charts/bar-chart-card.tsx
6
6
  const DOWN_FROM_ZERO = ["auto", 0];
7
7
  /** Values over an ordered axis as bars: one series, or several grouped or stacked. */
8
+ const dimUnselected = (color, isSelected) => isSelected ? color : `color-mix(in oklab, ${color} 55%, var(--card))`;
9
+ const signedFill = (color, isSelected) => `color-mix(in oklab, ${color} ${isSelected ? 35 : 15}%, var(--card))`;
8
10
  function BarChartCard({ stacked = false, selected = null, onSelect, ...props }) {
9
11
  return /* @__PURE__ */ jsx(ChartFrame, {
10
12
  chart: BarChart,
@@ -35,10 +37,15 @@ function BarChartCard({ stacked = false, selected = null, onSelect, ...props })
35
37
  0,
36
38
  0
37
39
  ] : 0,
38
- children: (negativeColor || selected !== null) && props.data.map((row, i) => /* @__PURE__ */ jsx(Cell, {
39
- fill: negativeColor && Number(row[key]) < 0 ? negativeColor : color,
40
- fillOpacity: selected === null || row[props.xKey] === selected ? 1 : .35
41
- }, i))
40
+ children: (negativeColor || selected !== null) && props.data.map((row, i) => {
41
+ const isSelected = selected === null || row[props.xKey] === selected;
42
+ const tone = negativeColor && Number(row[key]) < 0 ? negativeColor : color;
43
+ return negativeColor ? /* @__PURE__ */ jsx(Cell, {
44
+ fill: signedFill(tone, isSelected),
45
+ stroke: dimUnselected(tone, isSelected),
46
+ strokeWidth: 1.5
47
+ }, i) : /* @__PURE__ */ jsx(Cell, { fill: dimUnselected(tone, isSelected) }, i);
48
+ })
42
49
  }, key);
43
50
  })
44
51
  });