@siyahi/ui 0.1.9-next.22 → 0.1.9-next.23
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/DESIGN.md +3 -2
- package/agents/examples/accordion.tsx +7 -7
- package/agents/examples/alert.tsx +16 -15
- package/agents/examples/badge.tsx +20 -12
- package/agents/examples/bar-list-labels.tsx +6 -6
- package/agents/examples/bar-list-sides.tsx +8 -8
- package/agents/examples/bar-list.tsx +8 -8
- package/agents/examples/breadcrumb.tsx +3 -3
- package/agents/examples/callout.tsx +15 -15
- package/agents/examples/card.tsx +3 -3
- package/agents/examples/change-bar.tsx +21 -21
- package/agents/examples/chart-area.tsx +11 -11
- package/agents/examples/chart-bar-flows.tsx +1 -1
- package/agents/examples/chart-bar-hourly.tsx +1 -1
- package/agents/examples/chart-bar-losses.tsx +3 -3
- package/agents/examples/chart-bar-teams.tsx +72 -0
- package/agents/examples/chart-bar-years.tsx +5 -5
- package/agents/examples/chart-bar.tsx +10 -10
- package/agents/examples/chart-category-ticks.tsx +6 -6
- package/agents/examples/chart-line.tsx +17 -17
- package/agents/examples/collapsible.tsx +4 -2
- package/agents/examples/command.tsx +6 -6
- package/agents/examples/context-menu.tsx +2 -2
- package/agents/examples/data-bar.tsx +32 -45
- package/agents/examples/data-table-compact.tsx +31 -30
- package/agents/examples/data-table-filters.tsx +20 -20
- package/agents/examples/data-table.tsx +31 -30
- package/agents/examples/dialog.tsx +3 -3
- package/agents/examples/distribution-bar-tug.tsx +15 -15
- package/agents/examples/dropdown-menu.tsx +2 -2
- package/agents/examples/heatmap-calendar.tsx +6 -6
- package/agents/examples/heatmap-status.tsx +1 -1
- package/agents/examples/heatmap-weekday.tsx +7 -7
- package/agents/examples/input-states.tsx +9 -9
- package/agents/examples/input.tsx +3 -3
- package/agents/examples/local-time.tsx +1 -1
- package/agents/examples/metric-strip.tsx +8 -8
- package/agents/examples/page-hero.tsx +2 -2
- package/agents/examples/popover.tsx +3 -3
- package/agents/examples/price-chart.tsx +3 -3
- package/agents/examples/progress-tone.tsx +10 -9
- package/agents/examples/progress.tsx +1 -1
- package/agents/examples/range-position-table.tsx +31 -31
- package/agents/examples/range-position.tsx +18 -18
- package/agents/examples/section-cards-select.tsx +11 -10
- package/agents/examples/section-cards-trend.tsx +4 -4
- package/agents/examples/section-cards.tsx +13 -13
- package/agents/examples/select.tsx +9 -9
- package/agents/examples/separator.tsx +3 -3
- package/agents/examples/sheet.tsx +1 -1
- package/agents/examples/slider.tsx +1 -1
- package/agents/examples/surfaces.tsx +16 -18
- package/agents/examples/tabs.tsx +7 -7
- package/agents/examples/target-rows.tsx +25 -23
- package/agents/examples/tooltip.tsx +2 -2
- package/agents/examples/treemap.tsx +27 -24
- package/agents/manifest.json +15 -15
- package/dist/components/registry/charts/bar-chart-card.d.ts +1 -1
- package/dist/components/registry/charts/line-chart-card.d.ts +1 -1
- package/dist/components/registry/charts/line-chart-card.js +1 -1
- package/dist/components/siyahi/callout.d.ts +5 -12
- package/dist/components/siyahi/callout.js +5 -11
- package/dist/components/siyahi/status-alert.d.ts +15 -0
- package/dist/components/siyahi/status-alert.js +29 -0
- package/dist/components/siyahi/status-badge.d.ts +15 -0
- package/dist/components/siyahi/status-badge.js +24 -0
- package/dist/components/siyahi/tone-progress.d.ts +1 -1
- package/dist/components/siyahi/tone-progress.js +1 -1
- package/dist/components/siyahi/treemap.d.ts +4 -4
- package/dist/components/siyahi/treemap.js +2 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -2
- package/dist/lib/chart-frame.js +1 -1
- package/dist/lib/chart-series.d.ts +1 -1
- package/dist/lib/tone.d.ts +36 -0
- package/dist/lib/tone.js +35 -0
- package/package.json +1 -1
- package/agents/examples/chart-bar-sectors.tsx +0 -72
- package/dist/components/siyahi/warning-alert.d.ts +0 -10
- package/dist/components/siyahi/warning-alert.js +0 -20
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Alert } from "../ui/alert.js";
|
|
2
|
+
import { TONES } from "../../lib/tone.js";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { CircleAlertIcon, CircleCheckIcon, InfoIcon, LightbulbIcon, TriangleAlertIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/siyahi/status-alert.tsx
|
|
7
|
+
const ICONS = {
|
|
8
|
+
neutral: InfoIcon,
|
|
9
|
+
accent: LightbulbIcon,
|
|
10
|
+
warning: TriangleAlertIcon,
|
|
11
|
+
positive: CircleCheckIcon,
|
|
12
|
+
negative: CircleAlertIcon
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A notice the reader must not miss: the whole card takes its tone, a faint wash inside a border of the same colour,
|
|
16
|
+
* with the tone's icon. Title and description stay in the text colours so they read on the wash. Never mark a notice
|
|
17
|
+
* with a single coloured edge. Put an AlertTitle and an AlertDescription inside.
|
|
18
|
+
*/
|
|
19
|
+
function StatusAlert({ tone = "neutral", className, children, ...props }) {
|
|
20
|
+
const Icon = ICONS[tone];
|
|
21
|
+
return /* @__PURE__ */ jsxs(Alert, {
|
|
22
|
+
"data-tone": tone,
|
|
23
|
+
className: cn("gap-x-3 px-4 py-3", TONES[tone].box, className),
|
|
24
|
+
...props,
|
|
25
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: TONES[tone].ink }), children]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { StatusAlert };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Tone } from "../../lib/tone.js";
|
|
2
|
+
import { Badge } from "../ui/badge.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
//#region src/components/siyahi/status-badge.d.ts
|
|
5
|
+
export interface StatusBadgeProps extends Omit<ComponentProps<typeof Badge>, "variant"> {
|
|
6
|
+
/** positive for done or paid, warning for pending, negative for failed, accent for new, neutral for a draft. */
|
|
7
|
+
tone?: Tone;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A state, such as Paid, Pending or Failed: the badge takes its tone's wash and border, and a dot in the tone's
|
|
11
|
+
* colour marks it. The label stays in the text colour, since small coloured text on its own wash falls under 4.5:1.
|
|
12
|
+
* Categories (a team, a region) are not states: they stay outline badges.
|
|
13
|
+
*/
|
|
14
|
+
export declare function StatusBadge({ tone, className, children, ...props }: StatusBadgeProps): import("react").JSX.Element;
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Badge } from "../ui/badge.js";
|
|
2
|
+
import { TONES } from "../../lib/tone.js";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/siyahi/status-badge.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A state, such as Paid, Pending or Failed: the badge takes its tone's wash and border, and a dot in the tone's
|
|
8
|
+
* colour marks it. The label stays in the text colour, since small coloured text on its own wash falls under 4.5:1.
|
|
9
|
+
* Categories (a team, a region) are not states: they stay outline badges.
|
|
10
|
+
*/
|
|
11
|
+
function StatusBadge({ tone = "neutral", className, children, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsxs(Badge, {
|
|
13
|
+
variant: "outline",
|
|
14
|
+
"data-tone": tone,
|
|
15
|
+
className: cn(TONES[tone].box, className),
|
|
16
|
+
...props,
|
|
17
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
className: cn("size-1.5 rounded-full", TONES[tone].dot)
|
|
20
|
+
}), children]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { StatusBadge };
|
|
@@ -9,7 +9,7 @@ export interface ToneProgressProps extends ComponentProps<typeof Progress> {
|
|
|
9
9
|
/** The meaning colour of the bar: a gain's share in --positive, a loss's in --negative. */
|
|
10
10
|
tone: keyof typeof TONE;
|
|
11
11
|
}
|
|
12
|
-
/** shadcn's Progress with its bar in a meaning colour, such as each
|
|
12
|
+
/** shadcn's Progress with its bar in a meaning colour, such as each channel's share of profit or loss. */
|
|
13
13
|
export declare function ToneProgress({ tone, className, ...props }: ToneProgressProps): import("react").JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export {};
|
|
@@ -6,7 +6,7 @@ const TONE = {
|
|
|
6
6
|
positive: "**:data-[slot=progress-indicator]:bg-positive",
|
|
7
7
|
negative: "**:data-[slot=progress-indicator]:bg-negative"
|
|
8
8
|
};
|
|
9
|
-
/** shadcn's Progress with its bar in a meaning colour, such as each
|
|
9
|
+
/** shadcn's Progress with its bar in a meaning colour, such as each channel's share of profit or loss. */
|
|
10
10
|
function ToneProgress({ tone, className, ...props }) {
|
|
11
11
|
return /* @__PURE__ */ jsx(Progress, {
|
|
12
12
|
"data-tone": tone,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
//#region src/components/siyahi/treemap.d.ts
|
|
2
2
|
export interface TreemapItem {
|
|
3
3
|
name: string;
|
|
4
|
-
/** Tile area, such as
|
|
4
|
+
/** Tile area, such as a city's sales. Zero, negative and non-finite weights draw no tile. */
|
|
5
5
|
weight: number;
|
|
6
6
|
/** Signed change as a fraction; sets the heat. `null` when unknown: a muted tile marked "—". */
|
|
7
7
|
change: number | null;
|
|
8
|
-
/** Unique key when names repeat, such as one
|
|
8
|
+
/** Unique key when names repeat, such as one city sold to online and in stores. Defaults to `name`. */
|
|
9
9
|
key?: string;
|
|
10
|
-
/** Tiles of one group, such as a
|
|
10
|
+
/** Tiles of one group, such as a region, sit together under the group's name, even a group of one. */
|
|
11
11
|
group?: string;
|
|
12
12
|
}
|
|
13
13
|
export interface TreemapProps<T extends TreemapItem> {
|
|
@@ -29,7 +29,7 @@ export interface TreemapProps<T extends TreemapItem> {
|
|
|
29
29
|
*/
|
|
30
30
|
onSelect?: (item: T | null) => void;
|
|
31
31
|
}
|
|
32
|
-
/**
|
|
32
|
+
/** Heat map of parts of a whole: area by weight, colour by signed change, optionally grouped; hand-drawn SVG. */
|
|
33
33
|
export declare function Treemap<T extends TreemapItem>({ items, height, range, onHover, selected, onSelect }: TreemapProps<T>): import("react").JSX.Element;
|
|
34
34
|
export interface TreemapLegendProps {
|
|
35
35
|
/** The Treemap's own range, so each swatch matches its tiles. */
|
|
@@ -5,7 +5,7 @@ import { cn } from "cn";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useEffect, useEffectEvent, useMemo, useState } from "react";
|
|
7
7
|
//#region src/components/siyahi/treemap.tsx
|
|
8
|
-
/**
|
|
8
|
+
/** Heat map of parts of a whole: area by weight, colour by signed change, optionally grouped; hand-drawn SVG. */
|
|
9
9
|
function Treemap({ items, height, range, onHover, selected, onSelect }) {
|
|
10
10
|
const [ref, width] = useElementWidth();
|
|
11
11
|
const [focusedKey, setFocusedKey] = useState(null);
|
|
@@ -36,7 +36,7 @@ function Treemap({ items, height, range, onHover, selected, onSelect }) {
|
|
|
36
36
|
width,
|
|
37
37
|
height,
|
|
38
38
|
role: onSelect ? "group" : "img",
|
|
39
|
-
"aria-label": "Treemap
|
|
39
|
+
"aria-label": "Treemap by weight and change",
|
|
40
40
|
className: "text-xs",
|
|
41
41
|
onPointerLeave: (event) => event.pointerType === "mouse" && onHover?.(null),
|
|
42
42
|
children: [groups.map(({ group, ...box }) => /* @__PURE__ */ jsxs("svg", {
|
package/dist/index.d.ts
CHANGED
|
@@ -70,15 +70,16 @@ import { Quote, QuoteProps } from "./components/siyahi/quote.js";
|
|
|
70
70
|
import { RangePosition, RangePositionProps } from "./components/siyahi/range-position.js";
|
|
71
71
|
import { SiyahiLocale, defaultLocale } from "./lib/locale.js";
|
|
72
72
|
import { SiyahiProvider, SiyahiProviderProps, Surface, useLocale, useSurface } from "./components/siyahi/siyahi-provider.js";
|
|
73
|
+
import { Alert, AlertAction, AlertDescription, AlertTitle } from "./components/ui/alert.js";
|
|
74
|
+
import { StatusAlert, StatusAlertProps } from "./components/siyahi/status-alert.js";
|
|
75
|
+
import { Badge, badgeVariants } from "./components/ui/badge.js";
|
|
76
|
+
import { StatusBadge, StatusBadgeProps } from "./components/siyahi/status-badge.js";
|
|
73
77
|
import { TargetRow, TargetRows, TargetRowsProps, TargetStatus } from "./components/siyahi/target-rows.js";
|
|
74
78
|
import { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue } from "./components/ui/progress.js";
|
|
75
79
|
import { ToneProgress, ToneProgressProps } from "./components/siyahi/tone-progress.js";
|
|
76
80
|
import { Treemap, TreemapItem, TreemapLegend, TreemapLegendProps, TreemapProps } from "./components/siyahi/treemap.js";
|
|
77
|
-
import { Alert, AlertAction, AlertDescription, AlertTitle } from "./components/ui/alert.js";
|
|
78
|
-
import { WarningAlert } from "./components/siyahi/warning-alert.js";
|
|
79
81
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./components/ui/accordion.js";
|
|
80
82
|
import { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from "./components/ui/avatar.js";
|
|
81
|
-
import { Badge, badgeVariants } from "./components/ui/badge.js";
|
|
82
83
|
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/ui/breadcrumb.js";
|
|
83
84
|
import { Calendar, CalendarDayButton } from "./components/ui/calendar.js";
|
|
84
85
|
import { ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent } from "./components/ui/chart.js";
|
|
@@ -100,4 +101,4 @@ import { Textarea } from "./components/ui/textarea.js";
|
|
|
100
101
|
import { Toggle, toggleVariants } from "./components/ui/toggle.js";
|
|
101
102
|
import { ToggleGroup, ToggleGroupItem } from "./components/ui/toggle-group.js";
|
|
102
103
|
import { Formatters, TimeOptions, count, money, moneyCompact, pct, time, useFormat } from "./lib/format.js";
|
|
103
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActiveCell, ActiveSelection, Activity, Alert, AlertAction, AlertDescription, AlertTitle, AppSidebar, AppSidebarProps, AreaChartCard, AreaChartCardProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, 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, Callout, CalloutProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChangeBar, ChangeBarProps, ChartColor, ChartConfig, ChartContainer, ChartCurve, ChartLegend, ChartLegendContent, ChartReferenceLine, ChartSeries, ChartSeriesItem, ChartStyle, ChartTooltip, ChartTooltipContent, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorConfig, ColumnResizeInfo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CompactColumns, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DataBar, DataBarProps, DataList, DataListItem, DataListItemProps, DataTable, DataTableActions, DataTableBody, DataTableBodyProps, type DataTableCell, type DataTableColumn, DataTableColumnActions, type DataTableColumnDef, DataTableColumnFilter, DataTableColumnHeader, DataTableColumnHeaderProps, DataTableColumnHeaderRoot, DataTableColumnSortMenu, DataTableColumnSortOptions, DataTableColumnTitle, type DataTableColumns, DataTableCompactColumnsToggle, DataTableConfig, DataTableContainerProps, DataTableContext, DataTableContextState, DataTableEmptyActions, DataTableEmptyActionsProps, DataTableEmptyBody, DataTableEmptyBodyProps, DataTableEmptyDescription, DataTableEmptyDescriptionProps, DataTableEmptyFilteredMessage, DataTableEmptyFilteredMessageProps, DataTableEmptyIcon, DataTableEmptyIconProps, DataTableEmptyMessage, DataTableEmptyMessageProps, DataTableEmptyState, DataTableEmptyStateProps, DataTableEmptyTitle, DataTableEmptyTitleProps, DataTableErrorBoundary, DataTableErrorBoundaryProps, DataTableFacetedFilter, DataTableFacetedFilterContent, DataTableFootnote, DataTableFootnoteProps, 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, DataTableRowCount, DataTableRowCountProps, DataTableRowMenuScope, DataTableSearchFilter, DataTableSkeleton, DataTableSkeletonProps, DataTableSortHeader, DataTableToolbarSection, DataTableToolbarSectionProps, Delta, DeltaProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DistributionBar, DistributionBarProps, DistributionMarker, DistributionSegment, 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, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type JoinOperator, type JoinOperatorValues, Labels, LineChartCard, LineChartCardProps, LocalTime, LocalTimeProps, MetricStrip, MetricStripItem, MetricStripProps, NavMain, NavProjects, NavUser, NumericXProps, type Option, PageHero, PageHeroProps, PageSection, PageSectionProps, PageSubheading, PageToc, PageTocItem, PageTocProps, PanelGrid, PanelGridProps, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PriceChart, PriceChartProps, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, type QueryKeys, Quote, QuoteProps, RangePosition, RangePositionProps, RowMenuGroup, RowMenuItem, RowMenuLabel, RowMenuSeparator, RowMenuSub, RowMenuSubContent, RowMenuSubTrigger, ScrollAlign, ScrollArea, ScrollBar, type ScrollEvent, ScrollRowIntoView, SectionCard, SectionCards, SectionCardsProps, 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, Sparkline, SparklineProps, StatusActivity, StatusColorConfig, StatusHeatmap, StatusHeatmapBlock, StatusHeatmapBlockProps, StatusHeatmapBody, StatusHeatmapBodyProps, StatusHeatmapFooter, StatusHeatmapFooterProps, StatusHeatmapLabels, StatusHeatmapLegend, StatusHeatmapLegendProps, StatusHeatmapProps, StatusHeatmapStat, StatusHeatmapStatProps, StatusValue, Surface, Table, TableBody, TableCaption, TableCell, TableColumnActions, TableColumnActionsProps, TableColumnSortMenu, TableColumnSortOptions, TableColumnTitle, TableFacetedFilter, TableFacetedFilterContent, TableFacetedFilterProps, TableFooter, TableHead, TableHeader, TableRow, TableSearchFilter, TableSearchFilterProps, Tabs, TabsContent, TabsList, TabsTrigger, TargetRow, TargetRows, TargetRowsProps, TargetStatus, TeamSwitcher, Textarea, TimeOptions, Toggle, ToggleGroup, ToggleGroupItem, ToneProgress, ToneProgressProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Treemap, TreemapItem, TreemapLegend, TreemapLegendProps, TreemapProps, type ValueOf,
|
|
104
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActiveCell, ActiveSelection, Activity, Alert, AlertAction, AlertDescription, AlertTitle, AppSidebar, AppSidebarProps, AreaChartCard, AreaChartCardProps, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, 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, Callout, CalloutProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChangeBar, ChangeBarProps, ChartColor, ChartConfig, ChartContainer, ChartCurve, ChartLegend, ChartLegendContent, ChartReferenceLine, ChartSeries, ChartSeriesItem, ChartStyle, ChartTooltip, ChartTooltipContent, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorConfig, ColumnResizeInfo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CompactColumns, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DataBar, DataBarProps, DataList, DataListItem, DataListItemProps, DataTable, DataTableActions, DataTableBody, DataTableBodyProps, type DataTableCell, type DataTableColumn, DataTableColumnActions, type DataTableColumnDef, DataTableColumnFilter, DataTableColumnHeader, DataTableColumnHeaderProps, DataTableColumnHeaderRoot, DataTableColumnSortMenu, DataTableColumnSortOptions, DataTableColumnTitle, type DataTableColumns, DataTableCompactColumnsToggle, DataTableConfig, DataTableContainerProps, DataTableContext, DataTableContextState, DataTableEmptyActions, DataTableEmptyActionsProps, DataTableEmptyBody, DataTableEmptyBodyProps, DataTableEmptyDescription, DataTableEmptyDescriptionProps, DataTableEmptyFilteredMessage, DataTableEmptyFilteredMessageProps, DataTableEmptyIcon, DataTableEmptyIconProps, DataTableEmptyMessage, DataTableEmptyMessageProps, DataTableEmptyState, DataTableEmptyStateProps, DataTableEmptyTitle, DataTableEmptyTitleProps, DataTableErrorBoundary, DataTableErrorBoundaryProps, DataTableFacetedFilter, DataTableFacetedFilterContent, DataTableFootnote, DataTableFootnoteProps, 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, DataTableRowCount, DataTableRowCountProps, DataTableRowMenuScope, DataTableSearchFilter, DataTableSkeleton, DataTableSkeletonProps, DataTableSortHeader, DataTableToolbarSection, DataTableToolbarSectionProps, Delta, DeltaProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DistributionBar, DistributionBarProps, DistributionMarker, DistributionSegment, 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, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type JoinOperator, type JoinOperatorValues, Labels, LineChartCard, LineChartCardProps, LocalTime, LocalTimeProps, MetricStrip, MetricStripItem, MetricStripProps, NavMain, NavProjects, NavUser, NumericXProps, type Option, PageHero, PageHeroProps, PageSection, PageSectionProps, PageSubheading, PageToc, PageTocItem, PageTocProps, PanelGrid, PanelGridProps, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PriceChart, PriceChartProps, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, type QueryKeys, Quote, QuoteProps, RangePosition, RangePositionProps, RowMenuGroup, RowMenuItem, RowMenuLabel, RowMenuSeparator, RowMenuSub, RowMenuSubContent, RowMenuSubTrigger, ScrollAlign, ScrollArea, ScrollBar, type ScrollEvent, ScrollRowIntoView, SectionCard, SectionCards, SectionCardsProps, 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, Sparkline, SparklineProps, StatusActivity, StatusAlert, StatusAlertProps, StatusBadge, StatusBadgeProps, StatusColorConfig, StatusHeatmap, StatusHeatmapBlock, StatusHeatmapBlockProps, StatusHeatmapBody, StatusHeatmapBodyProps, StatusHeatmapFooter, StatusHeatmapFooterProps, StatusHeatmapLabels, StatusHeatmapLegend, StatusHeatmapLegendProps, StatusHeatmapProps, StatusHeatmapStat, StatusHeatmapStatProps, StatusValue, Surface, Table, TableBody, TableCaption, TableCell, TableColumnActions, TableColumnActionsProps, TableColumnSortMenu, TableColumnSortOptions, TableColumnTitle, TableFacetedFilter, TableFacetedFilterContent, TableFacetedFilterProps, TableFooter, TableHead, TableHeader, TableRow, TableSearchFilter, TableSearchFilterProps, Tabs, TabsContent, TabsList, TabsTrigger, TargetRow, TargetRows, TargetRowsProps, TargetStatus, TeamSwitcher, Textarea, TimeOptions, Toggle, ToggleGroup, ToggleGroupItem, ToneProgress, ToneProgressProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Treemap, TreemapItem, TreemapLegend, TreemapLegendProps, 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, badgeVariants, buttonVariants, count, defaultLocale, defaultSidebarOpen, flashCellKey, money, moneyCompact, pct, resolveGroupedRowsSlot, resolveRowContextMenuRenderer, tabsListVariants, time, toggleVariants, useColumnHeaderContext, useColumnResizeInfo, useDataTable, useDataTableActiveCell, useDataTableActiveCellSetter, useDataTableGroupRow, useDataTableRow, useFormat, useLocale, useResolvedRowContextMenuRenderer, useSidebar, useSurface, useTableFacetedFilter };
|
package/dist/index.js
CHANGED
|
@@ -93,8 +93,9 @@ import { PanelGrid } from "./components/siyahi/panel-grid.js";
|
|
|
93
93
|
import { PriceChart } from "./components/siyahi/price-chart.js";
|
|
94
94
|
import { Quote } from "./components/siyahi/quote.js";
|
|
95
95
|
import { RangePosition } from "./components/siyahi/range-position.js";
|
|
96
|
+
import { StatusAlert } from "./components/siyahi/status-alert.js";
|
|
97
|
+
import { StatusBadge } from "./components/siyahi/status-badge.js";
|
|
96
98
|
import { TargetRows } from "./components/siyahi/target-rows.js";
|
|
97
99
|
import { ToneProgress } from "./components/siyahi/tone-progress.js";
|
|
98
100
|
import { Treemap, TreemapLegend } from "./components/siyahi/treemap.js";
|
|
99
|
-
|
|
100
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertTitle, AppSidebar, AreaChartCard, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarChartCard, BarList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, CalendarHeatmap, CalendarHeatmapBlock, CalendarHeatmapBody, CalendarHeatmapFooter, CalendarHeatmapLegend, CalendarHeatmapStat, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChangeBar, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, 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, CopyButton, DataBar, DataList, DataListItem, DataTable, DataTableActions, DataTableBody, DataTableColumnActions, DataTableColumnFilter, DataTableColumnHeader, DataTableColumnHeaderRoot, DataTableColumnSortMenu, DataTableColumnSortOptions, DataTableColumnTitle, DataTableCompactColumnsToggle, DataTableContext, DataTableEmptyActions, DataTableEmptyBody, DataTableEmptyDescription, DataTableEmptyFilteredMessage, DataTableEmptyIcon, DataTableEmptyMessage, DataTableEmptyState, DataTableEmptyTitle, DataTableErrorBoundary, DataTableFacetedFilter, DataTableFacetedFilterContent, DataTableFootnote, DataTableGroupRowProvider, DataTableGroupedRowCells, DataTableGroupedRows, DataTableHeader, DataTableLoading, DataTableLoadingMore, DataTableProvider, DataTableRoot, DataTableRowContextMenu, DataTableRowContextMenuSlot, DataTableRowCount, DataTableRowMenuScope, DataTableSearchFilter, DataTableSkeleton, DataTableSortHeader, DataTableToolbarSection, Delta, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DistributionBar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, GroupedBodyRow, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, LineChartCard, LocalTime, MetricStrip, NavMain, NavProjects, NavUser, PageHero, PageSection, PageSubheading, PageToc, PanelGrid, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PriceChart, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, Quote, RangePosition, 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, Sparkline, StatusHeatmap, StatusHeatmapBlock, StatusHeatmapBody, StatusHeatmapFooter, StatusHeatmapLegend, StatusHeatmapStat, Table, TableBody, TableCaption, TableCell, TableColumnActions, TableColumnSortMenu, TableColumnSortOptions, TableColumnTitle, TableFacetedFilter, TableFacetedFilterContent, TableFooter, TableHead, TableHeader, TableRow, TableSearchFilter, Tabs, TabsContent, TabsList, TabsTrigger, TargetRows, TeamSwitcher, Textarea, Toggle, ToggleGroup, ToggleGroupItem, ToneProgress, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Treemap, TreemapLegend, WarningAlert, WeekdayHeatmap, WeekdayHeatmapBlock, WeekdayHeatmapBody, WeekdayHeatmapFooter, WeekdayHeatmapLegend, WeekdayHeatmapStat, badgeVariants, buttonVariants, count, defaultLocale, defaultSidebarOpen, flashCellKey, money, moneyCompact, pct, resolveGroupedRowsSlot, resolveRowContextMenuRenderer, tabsListVariants, time, toggleVariants, useColumnHeaderContext, useColumnResizeInfo, useDataTable, useDataTableActiveCell, useDataTableActiveCellSetter, useDataTableGroupRow, useDataTableRow, useFormat, useLocale, useResolvedRowContextMenuRenderer, useSidebar, useSurface, useTableFacetedFilter };
|
|
101
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertTitle, AppSidebar, AreaChartCard, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BarChartCard, BarList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, CalendarHeatmap, CalendarHeatmapBlock, CalendarHeatmapBody, CalendarHeatmapFooter, CalendarHeatmapLegend, CalendarHeatmapStat, Callout, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChangeBar, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, 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, CopyButton, DataBar, DataList, DataListItem, DataTable, DataTableActions, DataTableBody, DataTableColumnActions, DataTableColumnFilter, DataTableColumnHeader, DataTableColumnHeaderRoot, DataTableColumnSortMenu, DataTableColumnSortOptions, DataTableColumnTitle, DataTableCompactColumnsToggle, DataTableContext, DataTableEmptyActions, DataTableEmptyBody, DataTableEmptyDescription, DataTableEmptyFilteredMessage, DataTableEmptyIcon, DataTableEmptyMessage, DataTableEmptyState, DataTableEmptyTitle, DataTableErrorBoundary, DataTableFacetedFilter, DataTableFacetedFilterContent, DataTableFootnote, DataTableGroupRowProvider, DataTableGroupedRowCells, DataTableGroupedRows, DataTableHeader, DataTableLoading, DataTableLoadingMore, DataTableProvider, DataTableRoot, DataTableRowContextMenu, DataTableRowContextMenuSlot, DataTableRowCount, DataTableRowMenuScope, DataTableSearchFilter, DataTableSkeleton, DataTableSortHeader, DataTableToolbarSection, Delta, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DistributionBar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, GroupedBodyRow, InlineCode, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, LineChartCard, LocalTime, MetricStrip, NavMain, NavProjects, NavUser, PageHero, PageSection, PageSubheading, PageToc, PanelGrid, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PriceChart, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, Quote, RangePosition, 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, Sparkline, StatusAlert, StatusBadge, StatusHeatmap, StatusHeatmapBlock, StatusHeatmapBody, StatusHeatmapFooter, StatusHeatmapLegend, StatusHeatmapStat, Table, TableBody, TableCaption, TableCell, TableColumnActions, TableColumnSortMenu, TableColumnSortOptions, TableColumnTitle, TableFacetedFilter, TableFacetedFilterContent, TableFooter, TableHead, TableHeader, TableRow, TableSearchFilter, Tabs, TabsContent, TabsList, TabsTrigger, TargetRows, TeamSwitcher, Textarea, Toggle, ToggleGroup, ToggleGroupItem, ToneProgress, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Treemap, TreemapLegend, WeekdayHeatmap, WeekdayHeatmapBlock, WeekdayHeatmapBody, WeekdayHeatmapFooter, WeekdayHeatmapLegend, WeekdayHeatmapStat, badgeVariants, buttonVariants, count, defaultLocale, defaultSidebarOpen, flashCellKey, money, moneyCompact, pct, resolveGroupedRowsSlot, resolveRowContextMenuRenderer, tabsListVariants, time, toggleVariants, useColumnHeaderContext, useColumnResizeInfo, useDataTable, useDataTableActiveCell, useDataTableActiveCellSetter, useDataTableGroupRow, useDataTableRow, useFormat, useLocale, useResolvedRowContextMenuRenderer, useSidebar, useSurface, useTableFacetedFilter };
|
package/dist/lib/chart-frame.js
CHANGED
|
@@ -82,7 +82,7 @@ function endRoom(xFormatter, xTicks) {
|
|
|
82
82
|
* own ticks would rather drop a label than let it run into the next. With a detail, the second line comes from the
|
|
83
83
|
* tick's row; under a column the lines hang below the axis, and beside a horizontal bar they straddle its middle.
|
|
84
84
|
* A two-line tick is set in Geist, not Mono: a name with a figure under it reads as a label, as in BarList, and
|
|
85
|
-
*
|
|
85
|
+
* category names in Mono would take most of a phone's width.
|
|
86
86
|
*/
|
|
87
87
|
function fittedTick(data, xKey, xFormatter, detailOf, beside, labelWidth) {
|
|
88
88
|
const rows = /* @__PURE__ */ new Map();
|
|
@@ -71,7 +71,7 @@ export interface SeriesChartProps<T extends object, K extends keyof T> {
|
|
|
71
71
|
yTicks?: readonly number[];
|
|
72
72
|
/** Height of the plot and legend, in pixels. Sideways bars grow when wrapped tick details need more room. */
|
|
73
73
|
height: number;
|
|
74
|
-
/** A second line under each x tick, so a row's figure reads without a hover: "FY24" then "
|
|
74
|
+
/** A second line under each x tick, so a row's figure reads without a hover: "FY24" then "+₹1.2L". */
|
|
75
75
|
xTickDetail?: (row: T) => string;
|
|
76
76
|
/** A title under the x axis, such as "Hour of day (IST)". Not drawn on sideways bars. */
|
|
77
77
|
xLabel?: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/lib/tone.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The tones a box can take: a faint wash of the colour inside a full border of it, with the colour itself kept for
|
|
4
|
+
* an icon or a dot. Text inside stays in the text colours: small coloured text on its own wash falls under 4.5:1.
|
|
5
|
+
* Callout, StatusAlert and StatusBadge share these, so a warning looks the same wherever it appears.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TONES: {
|
|
8
|
+
readonly neutral: {
|
|
9
|
+
readonly box: "border-border bg-muted/50";
|
|
10
|
+
readonly ink: "text-muted-foreground!";
|
|
11
|
+
readonly dot: "bg-muted-foreground";
|
|
12
|
+
};
|
|
13
|
+
readonly accent: {
|
|
14
|
+
readonly box: "border-chart-1/35 bg-chart-1/8";
|
|
15
|
+
readonly ink: "text-link!";
|
|
16
|
+
readonly dot: "bg-link";
|
|
17
|
+
};
|
|
18
|
+
readonly warning: {
|
|
19
|
+
readonly box: "border-warning/45 bg-warning/10";
|
|
20
|
+
readonly ink: "text-warning!";
|
|
21
|
+
readonly dot: "bg-warning";
|
|
22
|
+
};
|
|
23
|
+
readonly positive: {
|
|
24
|
+
readonly box: "border-positive/40 bg-positive/8";
|
|
25
|
+
readonly ink: "text-positive!";
|
|
26
|
+
readonly dot: "bg-positive";
|
|
27
|
+
};
|
|
28
|
+
readonly negative: {
|
|
29
|
+
readonly box: "border-negative/40 bg-negative/8";
|
|
30
|
+
readonly ink: "text-negative!";
|
|
31
|
+
readonly dot: "bg-negative";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/** neutral for information, accent for a key point, warning for a caution, positive and negative for good and bad. */
|
|
35
|
+
export type Tone = keyof typeof TONES;
|
|
36
|
+
//#endregion
|
package/dist/lib/tone.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/lib/tone.ts
|
|
2
|
+
/**
|
|
3
|
+
* The tones a box can take: a faint wash of the colour inside a full border of it, with the colour itself kept for
|
|
4
|
+
* an icon or a dot. Text inside stays in the text colours: small coloured text on its own wash falls under 4.5:1.
|
|
5
|
+
* Callout, StatusAlert and StatusBadge share these, so a warning looks the same wherever it appears.
|
|
6
|
+
*/
|
|
7
|
+
const TONES = {
|
|
8
|
+
neutral: {
|
|
9
|
+
box: "border-border bg-muted/50",
|
|
10
|
+
ink: "text-muted-foreground!",
|
|
11
|
+
dot: "bg-muted-foreground"
|
|
12
|
+
},
|
|
13
|
+
accent: {
|
|
14
|
+
box: "border-chart-1/35 bg-chart-1/8",
|
|
15
|
+
ink: "text-link!",
|
|
16
|
+
dot: "bg-link"
|
|
17
|
+
},
|
|
18
|
+
warning: {
|
|
19
|
+
box: "border-warning/45 bg-warning/10",
|
|
20
|
+
ink: "text-warning!",
|
|
21
|
+
dot: "bg-warning"
|
|
22
|
+
},
|
|
23
|
+
positive: {
|
|
24
|
+
box: "border-positive/40 bg-positive/8",
|
|
25
|
+
ink: "text-positive!",
|
|
26
|
+
dot: "bg-positive"
|
|
27
|
+
},
|
|
28
|
+
negative: {
|
|
29
|
+
box: "border-negative/40 bg-negative/8",
|
|
30
|
+
ink: "text-negative!",
|
|
31
|
+
dot: "bg-negative"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { TONES };
|
package/package.json
CHANGED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { BarChartCard, ToggleGroup, ToggleGroupItem, useFormat, type ChartSeries } from "@siyahi/ui";
|
|
3
|
-
|
|
4
|
-
// Share of equity by sector against an index's weights; made-up figures.
|
|
5
|
-
const WEIGHTS = {
|
|
6
|
-
"Nifty 50": [
|
|
7
|
-
{ sector: "Financial Services", you: 0.34, index: 0.37 },
|
|
8
|
-
{ sector: "Information Technology", you: 0.21, index: 0.13 },
|
|
9
|
-
{ sector: "Oil, Gas & Consumable Fuels", you: 0.06, index: 0.1 },
|
|
10
|
-
{ sector: "Fast Moving Consumer Goods", you: 0.12, index: 0.08 },
|
|
11
|
-
{ sector: "Automobile and Auto Components", you: 0.09, index: 0.07 },
|
|
12
|
-
{ sector: "Healthcare", you: 0.08, index: 0.04 },
|
|
13
|
-
],
|
|
14
|
-
"Nifty 500": [
|
|
15
|
-
{ sector: "Financial Services", you: 0.34, index: 0.31 },
|
|
16
|
-
{ sector: "Information Technology", you: 0.21, index: 0.1 },
|
|
17
|
-
{ sector: "Oil, Gas & Consumable Fuels", you: 0.06, index: 0.08 },
|
|
18
|
-
{ sector: "Fast Moving Consumer Goods", you: 0.12, index: 0.07 },
|
|
19
|
-
{ sector: "Automobile and Auto Components", you: 0.09, index: 0.07 },
|
|
20
|
-
{ sector: "Healthcare", you: 0.08, index: 0.06 },
|
|
21
|
-
],
|
|
22
|
-
};
|
|
23
|
-
type Index = keyof typeof WEIGHTS;
|
|
24
|
-
type Row = (typeof WEIGHTS)[Index][number];
|
|
25
|
-
|
|
26
|
-
export default function ChartBarSectorsExample() {
|
|
27
|
-
const { pct } = useFormat();
|
|
28
|
-
const [index, setIndex] = useState<Index>("Nifty 50");
|
|
29
|
-
const rows = WEIGHTS[index];
|
|
30
|
-
const series: ChartSeries<Row> = [
|
|
31
|
-
{ key: "you", label: "You", color: "var(--chart-1)" },
|
|
32
|
-
{ key: "index", label: index, color: "var(--chart-2)" },
|
|
33
|
-
];
|
|
34
|
-
const gap = (row: Row) => {
|
|
35
|
-
const points = Math.abs(row.you - row.index) * 100;
|
|
36
|
-
return row.you >= row.index ? `▲${points.toFixed(1)} pts over` : `▼${points.toFixed(1)} pts under`;
|
|
37
|
-
};
|
|
38
|
-
return (
|
|
39
|
-
<BarChartCard
|
|
40
|
-
title="Sectors against the index"
|
|
41
|
-
description="Share of your equity and of the index, by sector"
|
|
42
|
-
action={
|
|
43
|
-
<ToggleGroup
|
|
44
|
-
value={[index]}
|
|
45
|
-
onValueChange={([next]) => {
|
|
46
|
-
// Pressing the selected index again would leave none selected; keep it.
|
|
47
|
-
if (next) setIndex(next as Index);
|
|
48
|
-
}}
|
|
49
|
-
variant="outline"
|
|
50
|
-
size="sm"
|
|
51
|
-
aria-label="Index"
|
|
52
|
-
>
|
|
53
|
-
<ToggleGroupItem value="Nifty 50">Nifty 50</ToggleGroupItem>
|
|
54
|
-
<ToggleGroupItem value="Nifty 500">Nifty 500</ToggleGroupItem>
|
|
55
|
-
</ToggleGroup>
|
|
56
|
-
}
|
|
57
|
-
horizontal
|
|
58
|
-
data={rows}
|
|
59
|
-
xKey="sector"
|
|
60
|
-
xTickDetail={(row) => `${pct(row.you)} vs ${pct(row.index)} · ${gap(row)}`}
|
|
61
|
-
series={series}
|
|
62
|
-
valueFormatter={(v) => pct(v)}
|
|
63
|
-
// A tick format puts the value axis along the bottom of the sideways bars.
|
|
64
|
-
yTickFormatter={(v) => pct(v, 0)}
|
|
65
|
-
// Sideways, y is still the value: the axis runs 0 to 40% and the cap is a value level.
|
|
66
|
-
yDomain={[0, 0.4]}
|
|
67
|
-
referenceLines={[{ y: 0.3, label: "cap 30%", labelPosition: "insideBottomRight" }]}
|
|
68
|
-
height={rows.length * 56 + 48}
|
|
69
|
-
footer={<p className="text-muted-foreground">Company shares only; ETFs and funds are left out.</p>}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Alert } from "../ui/alert.js";
|
|
2
|
-
import { ComponentProps } from "react";
|
|
3
|
-
//#region src/components/siyahi/warning-alert.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* An Alert for a caution the reader must not miss, such as withdrawn results or incomplete data: the whole card
|
|
6
|
-
* takes a faint amber wash inside an amber border, with the warning triangle. Never mark a warning with a single
|
|
7
|
-
* coloured edge; the tint is the card. Put an AlertTitle and an AlertDescription inside.
|
|
8
|
-
*/
|
|
9
|
-
export declare function WarningAlert({ className, children, ...props }: ComponentProps<typeof Alert>): import("react").JSX.Element;
|
|
10
|
-
//#endregion
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Alert } from "../ui/alert.js";
|
|
2
|
-
import { cn } from "cn";
|
|
3
|
-
import { TriangleAlertIcon } from "lucide-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/siyahi/warning-alert.tsx
|
|
6
|
-
/**
|
|
7
|
-
* An Alert for a caution the reader must not miss, such as withdrawn results or incomplete data: the whole card
|
|
8
|
-
* takes a faint amber wash inside an amber border, with the warning triangle. Never mark a warning with a single
|
|
9
|
-
* coloured edge; the tint is the card. Put an AlertTitle and an AlertDescription inside.
|
|
10
|
-
*/
|
|
11
|
-
function WarningAlert({ className, children, ...props }) {
|
|
12
|
-
return /* @__PURE__ */ jsxs(Alert, {
|
|
13
|
-
"data-tone": "warning",
|
|
14
|
-
className: cn("gap-x-3 border-warning/45 bg-warning/10 px-4 py-3 [&>svg]:text-warning!", className),
|
|
15
|
-
...props,
|
|
16
|
-
children: [/* @__PURE__ */ jsx(TriangleAlertIcon, {}), children]
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { WarningAlert };
|