@platned/ui 0.10.1 → 0.10.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/dist/index.d.ts CHANGED
@@ -4839,6 +4839,15 @@ interface BarChartSeries {
4839
4839
  tone?: ChartTone;
4840
4840
  color?: string;
4841
4841
  }
4842
+ /** A target or threshold drawn across the bars as a dashed line, e.g. "160h expected". */
4843
+ interface BarChartReference {
4844
+ value: number;
4845
+ /** Printed at the end of the line, and added to the chart's accessible name. */
4846
+ label?: string;
4847
+ /** Defaults to `warning`. */
4848
+ tone?: ChartTone;
4849
+ color?: string;
4850
+ }
4842
4851
  interface BarChartProps {
4843
4852
  /** Category names — the axis labels. */
4844
4853
  categories: string[];
@@ -4853,6 +4862,8 @@ interface BarChartProps {
4853
4862
  showLabels?: boolean;
4854
4863
  /** Print each bar's value at the end of the bar. Horizontal orientation only. */
4855
4864
  showValues?: boolean;
4865
+ /** A dashed target line across the value axis. The axis grows to fit it. */
4866
+ reference?: BarChartReference;
4856
4867
  radius?: number;
4857
4868
  label?: string;
4858
4869
  className?: string;
@@ -4867,7 +4878,7 @@ interface BarChartProps {
4867
4878
  * Deliberately axis-light: one baseline, no gridlines, no ticks. For anything needing
4868
4879
  * real axes or interaction, this is the wrong component.
4869
4880
  */
4870
- declare function BarChart({ categories, series, orientation, stacked, size, length, showLabels, showValues, radius, label, className, }: BarChartProps): react.JSX.Element | null;
4881
+ declare function BarChart({ categories, series, orientation, stacked, size, length, showLabels, showValues, reference, radius, label, className, }: BarChartProps): react.JSX.Element | null;
4871
4882
 
4872
4883
  type DonutChartSize = 'sm' | 'md' | 'lg';
4873
4884
  interface DonutSegment {
@@ -5827,4 +5838,4 @@ declare function ChatBubble({ sender, children, failed, className }: ChatBubbleP
5827
5838
 
5828
5839
  declare function AuroraBackdrop(): react.JSX.Element;
5829
5840
 
5830
- export { AIChatBar, type AIChatBarProps, AISuggestionChip, type AISuggestionChipProps, AccessibleIcon, type AccessibleIconProps, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemDef, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, AiAvatar, type AiAvatarProps, AspectRatio, type AspectRatioProps, AuroraBackdrop, Avatar, AvatarBlock, type AvatarBlockProps, AvatarGroup, type AvatarGroupProps, type AvatarGroupSpacing, type AvatarImageProps, type AvatarInitialProps, type AvatarProps, type AvatarShape, type AvatarSize, BADGE_COLORS, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BarChart, type BarChartOrientation, type BarChartProps, type BarChartSeries, type BarChartSize, Blockquote, type BlockquoteProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemDef, type BreadcrumbItemProps, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupAlign, type ButtonGroupItem, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonSize, type ButtonVariant, CHART_SEQUENCE, CHART_TONE, CHART_TRACK, COL_SPAN, COL_SPAN_BY_TIER, COUNTRY_CODES, Calendar, type CalendarMode, type CalendarProps, Card, CardAction, type CardActionProps, CardBody, type CardBodyProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterAlign, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, type CardRadius, type CardSize, CardTitle, type CardTitleProps, type CardTone, Carousel, CarouselControls, type CarouselControlsProps, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselViewport, type CarouselViewportProps, ChartLegend, type ChartLegendItem, type ChartLegendOrientation, type ChartLegendProps, type ChartTone, ChatBubble, type ChatBubbleProps, type ChatBubbleSender, CheckIndicator, type CheckIndicatorProps, type CheckIndicatorStatus, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, type CheckedGroup, CheckedGroupList, type CheckedGroupListColumns, type CheckedGroupListProps, ChecklistRow, type ChecklistRowProps, type ChecklistRowState, type ChoiceCardBreakpoint, type ColSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandItem, type CommandProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuItems, ContextMenuLabel, type ContextMenuProps, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type ContextMenuTriggerProps, ControlSizeProvider, type ControlSizeProviderProps, CopyButton, type CopyButtonProps, CountBadge, type CountBadgeProps, CountrySelect, type CountrySelectProps, DEFAULT_SCORE_THRESHOLDS, DatePicker, type DatePickerProps, type DateRange, type DependentOptions, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DetailGrid, type DetailGridColumns, type DetailGridProps, DetailItem, type DetailItemLayout, type DetailItemProps, type DetailItemSpan, DonutChart, type DonutChartProps, type DonutChartSize, type DonutSegment, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterAlign, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, type DrawerSide, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type MenuCheckboxItemProps as DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type MenuGroupProps as DropdownMenuGroupProps, DropdownMenuItem, type MenuItemProps as DropdownMenuItemProps, type MenuItemTone as DropdownMenuItemTone, DropdownMenuItems, DropdownMenuLabel, type MenuLabelProps as DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type MenuRadioGroupProps as DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type MenuRadioItemProps as DropdownMenuRadioItemProps, DropdownMenuSeparator, type MenuSeparatorProps as DropdownMenuSeparatorProps, DropdownMenuShortcut, type MenuShortcutProps as DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type MenuSubContentProps as DropdownMenuSubContentProps, type MenuSubProps as DropdownMenuSubProps, DropdownMenuSubTrigger, type MenuSubTriggerProps as DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmailText, EmptyState, type EmptyStateProps, type EmptyStateSize, type EmptyStateVariant, EntityIconBadge, type EntityIconBadgeProps, type EntityIconBadgeSize, type EntityIconBadgeTone, ErrorBoundary, type ErrorBoundaryProps, EyebrowLabel, type EyebrowLabelProps, type EyebrowLabelVariant, FOCUS_RING, FOCUS_RING_INSET, Field, type FieldContextValue, FieldDescription, FieldError, FieldGroup, type FieldGroupProps, FieldHint, FieldLabel, type FieldLabelProps, FieldLegend, type FieldLegendProps, type FieldOrientation, type FieldPart, type FieldProps, FieldSeparator, type FieldSeparatorProps, FieldSet, type FieldSetProps, type FieldTextProps, FileDropZone, type FileDropZoneProps, FileRow, type FileRowProps, FilterBar, type FilterBarProps, type FilterBarSize, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, Form, type FormActionsApi, FormCard, FormCardFooter, type FormCardFooterProps, FormCardHeader, type FormCardHeaderProps, type FormCheckField, type FormComboboxField, type FormCountryField, type FormCustomField, type FormDateField, type FormErrors, type FormField, type FormFieldBase, type FormFieldContext, type FormFieldSize, type FormFieldType, type FormLayout, type FormListField, type FormProps, type FormRadioField, type FormResult, type FormSegmentedField, type FormSelectField, type FormState, type FormStep, type FormSubmitOn, type FormTextField, type FormTextType, type FormTextareaField, type FormTimeZoneField, type FormValues, type FullscreenStacking, FullscreenSurface, type FullscreenSurfaceProps, GRID_TIERS, Grid, type GridBreakpoint, type GridColumnCount, type GridProps, type GridTier, HEIGHT_CLASS, HEIGHT_PX, Heading, HoverCard, type HoverCardProps, IconButton, type IconButtonProps, type IconButtonVariant, IconTextRow, type IconTextRowProps, InlineAlert, type InlineAlertProps, type InlineAlertTone, Input, InputControl, type InputControlProps, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupAlign, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputOTP, type InputOTPMode, type InputOTPProps, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, Label, type LabelProps, LegendDot, type LegendDotProps, type LegendDotShape, type LegendDotSize, ListRow, type ListRowDensity, type ListRowDivider, type ListRowProps, Listbox, type ListboxGroup, type ListboxOption, type ListboxProps, type MenuItemDef, Menubar, MenubarCheckboxItem, MenubarContent, type MenubarContentProps, MenubarGroup, MenubarItem, MenubarItems, MenubarLabel, MenubarMenu, type MenubarMenuDef, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, type MenubarTriggerProps, MiniBarChart, type MiniBarChartOrientation, type MiniBarChartProps, type MiniBarChartSize, Modal, type ModalAlign, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterAlign, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, type ModalTone, ModalTrigger, type ModalTriggerProps, MultiSelectCard, type MultiSelectCardProps, type MultiSelectCardSize, NativeSelect, NativeSelectControl, type NativeSelectControlProps, type NativeSelectProps, NavGroupHeader, type NavGroupHeaderProps, NavItem, type NavItemDensity, type NavItemProps, type NavItemSize, type NavItemVariant, NavSubItem, type NavSubItemProps, NavigationMenu, NavigationMenuItem, type NavigationMenuItemProps, type NavigationMenuOrientation, type NavigationMenuProps, type NavigationMenuVariant, NoteConfirmModal, type NoteConfirmModalProps, NumberedList, type NumberedListGap, type NumberedListItem, type NumberedListProps, OVERLAY_SCRIM, PageHeading, type PageHeadingProps, type PageHeadingSize, PageToolbar, type PageToolbarProps, type PageToolbarSize, Pagination, PaginationBar, type PaginationBarProps, type PaginationProps, type PaginationType, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, ProgressBarTone, type QuickAction, QuickActionsBar, type QuickActionsBarProps, Quote, ROLE_COMBO_OPTIONS, RadialGauge, type RadialGaugeProps, type RadialGaugeSize, Radio, RadioCards, RadioCardsItem, type RadioCardsItemProps, type RadioCardsProps, type RadioCardsSize, RadioGroup, type RadioGroupOption, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, Resizable, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, type ResizablePanelProps, type ResizableProps, type ResponsiveChoiceCardSize, RoleBadge, type RoleBadgeProps, type RoleBadgeTone, RoleComboBox, type RoleComboBoxProps, type RoleOption, SCROLLBAR_CLASSES, SchemaForm, type SchemaFormActionsApi, type SchemaFormCheckField, type SchemaFormComboboxField, type SchemaFormCountryField, type SchemaFormCustomField, type SchemaFormDateField, type SchemaFormErrors, type SchemaFormField, type SchemaFormFieldBase, type SchemaFormFieldContext, type SchemaFormFieldSize, type SchemaFormFieldType, type SchemaFormLayout, type SchemaFormListField, type SchemaFormProps, type SchemaFormRadioField, type SchemaFormResult, type SchemaFormSegmentedField, type SchemaFormSelectField, type SchemaFormState, type SchemaFormStep, type SchemaFormSubmitOn, type SchemaFormTextField, type SchemaFormTextType, type SchemaFormTextareaField, type SchemaFormTimeZoneField, type SchemaFormValues, type ScoreDirection, type ScoreRampTone, type ScoreThresholds, type ScoreTone, ScoreValue, type ScoreValueProps, type ScoreValueSize, type ScoreValueTone, type ScoreValueWeight, ScoredRow, type ScoredRowAlign, type ScoredRowGap, type ScoredRowProps, Scrim, type ScrimProps, ScrollArea, type ScrollAreaAxis, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, type SectionProps, type SectionSize, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectControl, type SelectControlProps, type SelectOption, type SelectOptionGroup, type SelectProps, Separator, type SeparatorOrientation, type SeparatorProps, Sidebar, type SidebarContextValue, type SidebarLinkComponent, type SidebarLinkProps, type SidebarNavGroup, type SidebarNavItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarRenderState, SidebarSeparator, type SidebarSeparatorProps, SidebarTrigger, type SidebarTriggerProps, SidebarUserCard, type SidebarUserCardProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Slot, type SlotProps, type SpaceToken, Sparkline, type SparklineProps, type SparklineSize, type SparklineVariant, Spinner, type SpinnerProps, type SpinnerSize, StatNumber, type StatNumberProps, type StatNumberSize, type StatNumberWeight, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, StatusChip, type StatusChipProps, StatusDot, type StatusDotProps, type StatusDotTone, type StatusTone, type StepItem, type StepStatus, Stepper, type StepperAlign, type StepperCompactInfo, type StepperProps, type StepperSize, StepsList, type StepsListProps, Subheading, Subtitle, Switch, type SwitchProps, type SwitchSize, TIER_COLS, TIER_MIN_PX, type TabItem, Tabs, type TabsActivation, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, type TabsRootProps, type TabsSize, TabsTrigger, type TabsTriggerProps, type TabsVariant, TagInput, type TagInputParseResult, type TagInputProps, TagPill, type TagPillProps, type TagPillSize, type TagPillTone, Text, TextCode, TextEmphasis, TextLink, type TextLinkProps, type TextLinkTone, TextList, type TextListDensity, TextListItem, type TextListItemProps, type TextListProps, type TextListVariant, type TextProps, TextSmall, TextStrong, TextTiny, type TextTone, Textarea, TextareaControl, type TextareaControlProps, type TextareaProps, TileGrid, type TileGridBreakpoint, type TileGridColumns, type TileGridProps, TimeZoneSelect, type TimeZoneSelectProps, TitleHero, TitlePage, type ToastOptions, type ToastRecord, type ToastTone, Toaster, type ToasterPosition, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupType, type ToggleProps, type ToggleSize, type ToggleVariant, Tooltip, type TooltipProps, TrailChip, type TrailChipProps, type TreeItemState, TreeView, type TreeViewProps, type TreeViewSize, type TrendDirection, TrendLabel, type TrendLabelProps, type TrendLabelSize, type TrendLabelWeight, TypingIndicator, type TypingIndicatorProps, type UseFilePicker, type UseFilePickerOptions, type UseWidthTierOptions, type UseWidthTierResult, type UserAccountStatus, UserStatusPill, type UserStatusPillProps, VisuallyHidden, type VisuallyHiddenProps, WidgetFooter, type WidgetFooterProps, WidgetGrid, WidgetGridItem, type WidgetGridItemProps, type WidgetGridProps, WidgetGridRow, type WidgetGridRowProps, WidgetHeader, WidgetHeaderAccessoryProvider, type WidgetHeaderAccessoryProviderProps, type WidgetHeaderEyebrowVariant, type WidgetHeaderProps, type WidgetHeight, WidgetTitle, type WidgetTitleProps, type WidgetTitleSize, cn, colsFor, composeRefs, countryOptions, currentZoneName, filterNav, filterNavItems, formatFileSize, getScoreTone, nextTier, paginationRange, quantizeWidth, resolveChartColor, slotWidthPx, tabId, tabPanelId, tierForWidth, timeZoneOffset, timeZoneOptions, useControlSize, useDependentOptions, useElementWidth, useFieldContext, useFieldControl, useFilePicker, useOverlayDismiss, usePortalContainer, useSidebar, useToast, useWidgetHeaderAccessory, useWidthTier };
5841
+ export { AIChatBar, type AIChatBarProps, AISuggestionChip, type AISuggestionChipProps, AccessibleIcon, type AccessibleIconProps, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemDef, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, AiAvatar, type AiAvatarProps, AspectRatio, type AspectRatioProps, AuroraBackdrop, Avatar, AvatarBlock, type AvatarBlockProps, AvatarGroup, type AvatarGroupProps, type AvatarGroupSpacing, type AvatarImageProps, type AvatarInitialProps, type AvatarProps, type AvatarShape, type AvatarSize, BADGE_COLORS, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BarChart, type BarChartOrientation, type BarChartProps, type BarChartReference, type BarChartSeries, type BarChartSize, Blockquote, type BlockquoteProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemDef, type BreadcrumbItemProps, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupAlign, type ButtonGroupItem, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonSize, type ButtonVariant, CHART_SEQUENCE, CHART_TONE, CHART_TRACK, COL_SPAN, COL_SPAN_BY_TIER, COUNTRY_CODES, Calendar, type CalendarMode, type CalendarProps, Card, CardAction, type CardActionProps, CardBody, type CardBodyProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterAlign, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, type CardRadius, type CardSize, CardTitle, type CardTitleProps, type CardTone, Carousel, CarouselControls, type CarouselControlsProps, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselViewport, type CarouselViewportProps, ChartLegend, type ChartLegendItem, type ChartLegendOrientation, type ChartLegendProps, type ChartTone, ChatBubble, type ChatBubbleProps, type ChatBubbleSender, CheckIndicator, type CheckIndicatorProps, type CheckIndicatorStatus, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, type CheckedGroup, CheckedGroupList, type CheckedGroupListColumns, type CheckedGroupListProps, ChecklistRow, type ChecklistRowProps, type ChecklistRowState, type ChoiceCardBreakpoint, type ColSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, type ComboboxOption, type ComboboxProps, Command, type CommandItem, type CommandProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuItems, ContextMenuLabel, type ContextMenuProps, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type ContextMenuTriggerProps, ControlSizeProvider, type ControlSizeProviderProps, CopyButton, type CopyButtonProps, CountBadge, type CountBadgeProps, CountrySelect, type CountrySelectProps, DEFAULT_SCORE_THRESHOLDS, DatePicker, type DatePickerProps, type DateRange, type DependentOptions, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DetailGrid, type DetailGridColumns, type DetailGridProps, DetailItem, type DetailItemLayout, type DetailItemProps, type DetailItemSpan, DonutChart, type DonutChartProps, type DonutChartSize, type DonutSegment, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterAlign, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, type DrawerSide, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type MenuCheckboxItemProps as DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type MenuGroupProps as DropdownMenuGroupProps, DropdownMenuItem, type MenuItemProps as DropdownMenuItemProps, type MenuItemTone as DropdownMenuItemTone, DropdownMenuItems, DropdownMenuLabel, type MenuLabelProps as DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type MenuRadioGroupProps as DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type MenuRadioItemProps as DropdownMenuRadioItemProps, DropdownMenuSeparator, type MenuSeparatorProps as DropdownMenuSeparatorProps, DropdownMenuShortcut, type MenuShortcutProps as DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type MenuSubContentProps as DropdownMenuSubContentProps, type MenuSubProps as DropdownMenuSubProps, DropdownMenuSubTrigger, type MenuSubTriggerProps as DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmailText, EmptyState, type EmptyStateProps, type EmptyStateSize, type EmptyStateVariant, EntityIconBadge, type EntityIconBadgeProps, type EntityIconBadgeSize, type EntityIconBadgeTone, ErrorBoundary, type ErrorBoundaryProps, EyebrowLabel, type EyebrowLabelProps, type EyebrowLabelVariant, FOCUS_RING, FOCUS_RING_INSET, Field, type FieldContextValue, FieldDescription, FieldError, FieldGroup, type FieldGroupProps, FieldHint, FieldLabel, type FieldLabelProps, FieldLegend, type FieldLegendProps, type FieldOrientation, type FieldPart, type FieldProps, FieldSeparator, type FieldSeparatorProps, FieldSet, type FieldSetProps, type FieldTextProps, FileDropZone, type FileDropZoneProps, FileRow, type FileRowProps, FilterBar, type FilterBarProps, type FilterBarSize, Flex, type FlexAlign, type FlexDirection, type FlexJustify, type FlexProps, Form, type FormActionsApi, FormCard, FormCardFooter, type FormCardFooterProps, FormCardHeader, type FormCardHeaderProps, type FormCheckField, type FormComboboxField, type FormCountryField, type FormCustomField, type FormDateField, type FormErrors, type FormField, type FormFieldBase, type FormFieldContext, type FormFieldSize, type FormFieldType, type FormLayout, type FormListField, type FormProps, type FormRadioField, type FormResult, type FormSegmentedField, type FormSelectField, type FormState, type FormStep, type FormSubmitOn, type FormTextField, type FormTextType, type FormTextareaField, type FormTimeZoneField, type FormValues, type FullscreenStacking, FullscreenSurface, type FullscreenSurfaceProps, GRID_TIERS, Grid, type GridBreakpoint, type GridColumnCount, type GridProps, type GridTier, HEIGHT_CLASS, HEIGHT_PX, Heading, HoverCard, type HoverCardProps, IconButton, type IconButtonProps, type IconButtonVariant, IconTextRow, type IconTextRowProps, InlineAlert, type InlineAlertProps, type InlineAlertTone, Input, InputControl, type InputControlProps, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupAlign, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputOTP, type InputOTPMode, type InputOTPProps, type InputProps, type InputSize, Kbd, type KbdProps, type KbdSize, Label, type LabelProps, LegendDot, type LegendDotProps, type LegendDotShape, type LegendDotSize, ListRow, type ListRowDensity, type ListRowDivider, type ListRowProps, Listbox, type ListboxGroup, type ListboxOption, type ListboxProps, type MenuItemDef, Menubar, MenubarCheckboxItem, MenubarContent, type MenubarContentProps, MenubarGroup, MenubarItem, MenubarItems, MenubarLabel, MenubarMenu, type MenubarMenuDef, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, type MenubarTriggerProps, MiniBarChart, type MiniBarChartOrientation, type MiniBarChartProps, type MiniBarChartSize, Modal, type ModalAlign, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterAlign, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalSize, ModalTitle, type ModalTitleProps, type ModalTone, ModalTrigger, type ModalTriggerProps, MultiSelectCard, type MultiSelectCardProps, type MultiSelectCardSize, NativeSelect, NativeSelectControl, type NativeSelectControlProps, type NativeSelectProps, NavGroupHeader, type NavGroupHeaderProps, NavItem, type NavItemDensity, type NavItemProps, type NavItemSize, type NavItemVariant, NavSubItem, type NavSubItemProps, NavigationMenu, NavigationMenuItem, type NavigationMenuItemProps, type NavigationMenuOrientation, type NavigationMenuProps, type NavigationMenuVariant, NoteConfirmModal, type NoteConfirmModalProps, NumberedList, type NumberedListGap, type NumberedListItem, type NumberedListProps, OVERLAY_SCRIM, PageHeading, type PageHeadingProps, type PageHeadingSize, PageToolbar, type PageToolbarProps, type PageToolbarSize, Pagination, PaginationBar, type PaginationBarProps, type PaginationProps, type PaginationType, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, ProgressBarTone, type QuickAction, QuickActionsBar, type QuickActionsBarProps, Quote, ROLE_COMBO_OPTIONS, RadialGauge, type RadialGaugeProps, type RadialGaugeSize, Radio, RadioCards, RadioCardsItem, type RadioCardsItemProps, type RadioCardsProps, type RadioCardsSize, RadioGroup, type RadioGroupOption, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, Resizable, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, type ResizablePanelProps, type ResizableProps, type ResponsiveChoiceCardSize, RoleBadge, type RoleBadgeProps, type RoleBadgeTone, RoleComboBox, type RoleComboBoxProps, type RoleOption, SCROLLBAR_CLASSES, SchemaForm, type SchemaFormActionsApi, type SchemaFormCheckField, type SchemaFormComboboxField, type SchemaFormCountryField, type SchemaFormCustomField, type SchemaFormDateField, type SchemaFormErrors, type SchemaFormField, type SchemaFormFieldBase, type SchemaFormFieldContext, type SchemaFormFieldSize, type SchemaFormFieldType, type SchemaFormLayout, type SchemaFormListField, type SchemaFormProps, type SchemaFormRadioField, type SchemaFormResult, type SchemaFormSegmentedField, type SchemaFormSelectField, type SchemaFormState, type SchemaFormStep, type SchemaFormSubmitOn, type SchemaFormTextField, type SchemaFormTextType, type SchemaFormTextareaField, type SchemaFormTimeZoneField, type SchemaFormValues, type ScoreDirection, type ScoreRampTone, type ScoreThresholds, type ScoreTone, ScoreValue, type ScoreValueProps, type ScoreValueSize, type ScoreValueTone, type ScoreValueWeight, ScoredRow, type ScoredRowAlign, type ScoredRowGap, type ScoredRowProps, Scrim, type ScrimProps, ScrollArea, type ScrollAreaAxis, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, type SectionProps, type SectionSize, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectControl, type SelectControlProps, type SelectOption, type SelectOptionGroup, type SelectProps, Separator, type SeparatorOrientation, type SeparatorProps, Sidebar, type SidebarContextValue, type SidebarLinkComponent, type SidebarLinkProps, type SidebarNavGroup, type SidebarNavItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarRenderState, SidebarSeparator, type SidebarSeparatorProps, SidebarTrigger, type SidebarTriggerProps, SidebarUserCard, type SidebarUserCardProps, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderProps, Slot, type SlotProps, type SpaceToken, Sparkline, type SparklineProps, type SparklineSize, type SparklineVariant, Spinner, type SpinnerProps, type SpinnerSize, StatNumber, type StatNumberProps, type StatNumberSize, type StatNumberWeight, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, type StatusBadgeSize, StatusChip, type StatusChipProps, StatusDot, type StatusDotProps, type StatusDotTone, type StatusTone, type StepItem, type StepStatus, Stepper, type StepperAlign, type StepperCompactInfo, type StepperProps, type StepperSize, StepsList, type StepsListProps, Subheading, Subtitle, Switch, type SwitchProps, type SwitchSize, TIER_COLS, TIER_MIN_PX, type TabItem, Tabs, type TabsActivation, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, type TabsRootProps, type TabsSize, TabsTrigger, type TabsTriggerProps, type TabsVariant, TagInput, type TagInputParseResult, type TagInputProps, TagPill, type TagPillProps, type TagPillSize, type TagPillTone, Text, TextCode, TextEmphasis, TextLink, type TextLinkProps, type TextLinkTone, TextList, type TextListDensity, TextListItem, type TextListItemProps, type TextListProps, type TextListVariant, type TextProps, TextSmall, TextStrong, TextTiny, type TextTone, Textarea, TextareaControl, type TextareaControlProps, type TextareaProps, TileGrid, type TileGridBreakpoint, type TileGridColumns, type TileGridProps, TimeZoneSelect, type TimeZoneSelectProps, TitleHero, TitlePage, type ToastOptions, type ToastRecord, type ToastTone, Toaster, type ToasterPosition, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupType, type ToggleProps, type ToggleSize, type ToggleVariant, Tooltip, type TooltipProps, TrailChip, type TrailChipProps, type TreeItemState, TreeView, type TreeViewProps, type TreeViewSize, type TrendDirection, TrendLabel, type TrendLabelProps, type TrendLabelSize, type TrendLabelWeight, TypingIndicator, type TypingIndicatorProps, type UseFilePicker, type UseFilePickerOptions, type UseWidthTierOptions, type UseWidthTierResult, type UserAccountStatus, UserStatusPill, type UserStatusPillProps, VisuallyHidden, type VisuallyHiddenProps, WidgetFooter, type WidgetFooterProps, WidgetGrid, WidgetGridItem, type WidgetGridItemProps, type WidgetGridProps, WidgetGridRow, type WidgetGridRowProps, WidgetHeader, WidgetHeaderAccessoryProvider, type WidgetHeaderAccessoryProviderProps, type WidgetHeaderEyebrowVariant, type WidgetHeaderProps, type WidgetHeight, WidgetTitle, type WidgetTitleProps, type WidgetTitleSize, cn, colsFor, composeRefs, countryOptions, currentZoneName, filterNav, filterNavItems, formatFileSize, getScoreTone, nextTier, paginationRange, quantizeWidth, resolveChartColor, slotWidthPx, tabId, tabPanelId, tierForWidth, timeZoneOffset, timeZoneOptions, useControlSize, useDependentOptions, useElementWidth, useFieldContext, useFieldControl, useFilePicker, useOverlayDismiss, usePortalContainer, useSidebar, useToast, useWidgetHeaderAccessory, useWidthTier };
package/dist/index.js CHANGED
@@ -8648,6 +8648,7 @@ function BarChart({
8648
8648
  length = 240,
8649
8649
  showLabels = true,
8650
8650
  showValues = false,
8651
+ reference,
8651
8652
  radius = 3,
8652
8653
  label,
8653
8654
  className
@@ -8658,73 +8659,111 @@ function BarChart({
8658
8659
  const categoryTotals = categories.map(
8659
8660
  (_, ci) => stacked ? series.reduce((sum, s) => sum + Math.max(0, s.values[ci] ?? 0), 0) : Math.max(...series.map((s) => Math.max(0, s.values[ci] ?? 0)))
8660
8661
  );
8661
- const max = Math.max(...categoryTotals, 1);
8662
+ const referenceValue = reference ? Math.max(0, reference.value) : 0;
8663
+ const max = Math.max(...categoryTotals, referenceValue, 1);
8662
8664
  const horizontal = orientation === "horizontal";
8663
- return /* @__PURE__ */ jsx82(
8665
+ const referenceColor = reference ? resolveChartColor(reference.color, reference.tone ?? "warning") : void 0;
8666
+ const referenceAt = `${referenceValue / max * 100}%`;
8667
+ const accessibleName = label && reference?.label ? `${label}. ${reference.label}` : label;
8668
+ return /* @__PURE__ */ jsxs55(
8664
8669
  "div",
8665
8670
  {
8666
- className: clsx61("flex w-full min-w-0", horizontal ? "flex-col gap-2" : "flex-row items-end gap-3", className),
8671
+ className: clsx61(
8672
+ "flex w-full min-w-0",
8673
+ horizontal ? "flex-col gap-2" : "flex-row items-end gap-3",
8674
+ reference && "relative",
8675
+ className
8676
+ ),
8667
8677
  role: label ? "img" : void 0,
8668
- "aria-label": label,
8678
+ "aria-label": accessibleName,
8669
8679
  "aria-hidden": label ? void 0 : true,
8670
- children: categories.map((category, ci) => {
8671
- const bars = series.map((s, si) => ({
8672
- key: s.label,
8673
- value: Math.max(0, s.values[ci] ?? 0),
8674
- color: resolveChartColor(s.color, s.tone, si)
8675
- }));
8676
- return /* @__PURE__ */ jsxs55(
8680
+ children: [
8681
+ categories.map((category, ci) => {
8682
+ const bars = series.map((s, si) => ({
8683
+ key: s.label,
8684
+ value: Math.max(0, s.values[ci] ?? 0),
8685
+ color: resolveChartColor(s.color, s.tone, si)
8686
+ }));
8687
+ return /* @__PURE__ */ jsxs55(
8688
+ "div",
8689
+ {
8690
+ className: clsx61("flex min-w-0", horizontal ? "flex-col gap-1" : "h-full flex-col justify-end gap-1.5"),
8691
+ style: horizontal ? void 0 : { width: perCategory },
8692
+ children: [
8693
+ showLabels && horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("truncate text-default-secondary", labelClass2), children: category }),
8694
+ /* @__PURE__ */ jsxs55(
8695
+ "div",
8696
+ {
8697
+ className: clsx61("flex", horizontal ? "items-center gap-2" : "w-full flex-1 items-end justify-center"),
8698
+ style: horizontal ? void 0 : { height: length },
8699
+ children: [
8700
+ /* @__PURE__ */ jsx82(
8701
+ "div",
8702
+ {
8703
+ className: clsx61("flex min-w-0", stacked ? "gap-0" : ""),
8704
+ style: horizontal ? { width: length, flexDirection: stacked ? "row" : "column", gap: stacked ? 0 : gap } : {
8705
+ height: "100%",
8706
+ width: perCategory,
8707
+ flexDirection: stacked ? "column-reverse" : "row",
8708
+ alignItems: "flex-end",
8709
+ gap: stacked ? 0 : gap
8710
+ },
8711
+ children: bars.map((bar) => {
8712
+ const extent = `${bar.value / max * 100}%`;
8713
+ return /* @__PURE__ */ jsx82(
8714
+ "div",
8715
+ {
8716
+ title: `${category} \xB7 ${bar.key}: ${bar.value}`,
8717
+ className: "transition-all motion-reduce:transition-none",
8718
+ style: {
8719
+ backgroundColor: bar.color,
8720
+ borderRadius: radius,
8721
+ ...horizontal ? { width: extent, height: stacked ? band : band } : { height: extent, width: stacked ? perCategory : band }
8722
+ }
8723
+ },
8724
+ bar.key
8725
+ );
8726
+ })
8727
+ }
8728
+ ),
8729
+ showValues && horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("shrink-0 tabular-nums text-default-secondary", labelClass2), children: categoryTotals[ci] })
8730
+ ]
8731
+ }
8732
+ ),
8733
+ showLabels && !horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("truncate text-center text-default-secondary", labelClass2), children: category })
8734
+ ]
8735
+ },
8736
+ category
8737
+ );
8738
+ }),
8739
+ reference && // Laid over the bar area only. Vertical bars all start at the top of their column
8740
+ // (the labels sit below), so the band is the top `length` px; horizontal tracks all
8741
+ // start at the left edge, so the line sits `referenceAt` of `length` from it.
8742
+ /* @__PURE__ */ jsx82(
8677
8743
  "div",
8678
8744
  {
8679
- className: clsx61("flex min-w-0", horizontal ? "flex-col gap-1" : "h-full flex-col justify-end gap-1.5"),
8680
- style: horizontal ? void 0 : { width: perCategory },
8681
- children: [
8682
- showLabels && horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("truncate text-default-secondary", labelClass2), children: category }),
8683
- /* @__PURE__ */ jsxs55(
8684
- "div",
8685
- {
8686
- className: clsx61("flex", horizontal ? "items-center gap-2" : "w-full flex-1 items-end justify-center"),
8687
- style: horizontal ? void 0 : { height: length },
8688
- children: [
8689
- /* @__PURE__ */ jsx82(
8690
- "div",
8691
- {
8692
- className: clsx61("flex min-w-0", stacked ? "gap-0" : ""),
8693
- style: horizontal ? { width: length, flexDirection: stacked ? "row" : "column", gap: stacked ? 0 : gap } : {
8694
- height: "100%",
8695
- width: perCategory,
8696
- flexDirection: stacked ? "column-reverse" : "row",
8697
- alignItems: "flex-end",
8698
- gap: stacked ? 0 : gap
8699
- },
8700
- children: bars.map((bar) => {
8701
- const extent = `${bar.value / max * 100}%`;
8702
- return /* @__PURE__ */ jsx82(
8703
- "div",
8704
- {
8705
- title: `${category} \xB7 ${bar.key}: ${bar.value}`,
8706
- className: "transition-all motion-reduce:transition-none",
8707
- style: {
8708
- backgroundColor: bar.color,
8709
- borderRadius: radius,
8710
- ...horizontal ? { width: extent, height: stacked ? band : band } : { height: extent, width: stacked ? perCategory : band }
8711
- }
8712
- },
8713
- bar.key
8714
- );
8715
- })
8716
- }
8717
- ),
8718
- showValues && horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("shrink-0 tabular-nums text-default-secondary", labelClass2), children: categoryTotals[ci] })
8719
- ]
8720
- }
8721
- ),
8722
- showLabels && !horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("truncate text-center text-default-secondary", labelClass2), children: category })
8723
- ]
8724
- },
8725
- category
8726
- );
8727
- })
8745
+ "data-chart-reference": "",
8746
+ "aria-hidden": true,
8747
+ className: "pointer-events-none absolute",
8748
+ style: horizontal ? { top: 0, bottom: 0, left: 0, width: length } : { top: 0, left: 0, right: 0, height: length },
8749
+ children: /* @__PURE__ */ jsx82(
8750
+ "div",
8751
+ {
8752
+ className: "absolute",
8753
+ style: horizontal ? { top: 0, bottom: 0, left: referenceAt, borderLeft: `2px dashed ${referenceColor}` } : { left: 0, right: 0, bottom: referenceAt, borderTop: `2px dashed ${referenceColor}` },
8754
+ children: reference.label && /* @__PURE__ */ jsx82(
8755
+ "span",
8756
+ {
8757
+ className: clsx61("absolute whitespace-nowrap", labelClass2),
8758
+ style: horizontal ? { top: 0, left: 4, color: referenceColor } : { right: 0, bottom: 2, color: referenceColor },
8759
+ children: reference.label
8760
+ }
8761
+ )
8762
+ }
8763
+ )
8764
+ }
8765
+ )
8766
+ ]
8728
8767
  }
8729
8768
  );
8730
8769
  }