@cytario/design 9.3.1 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ButtonProps as ButtonProps$1, LinkProps as LinkProps$1, ToggleButtonProps as ToggleButtonProps$1, TextFieldProps, TextField, ColorField, SelectProps as SelectProps$1, CellProps as CellProps$1, ColumnProps as ColumnProps$1, TableProps, RowProps as RowProps$1, TableBodyProps, TableHeaderProps, CheckboxProps as CheckboxProps$1, SwitchProps as SwitchProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, LabelProps as LabelProps$1, Selection, PressEvent, PopoverProps as PopoverProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps as TabPanelProps$1, TabsProps as TabsProps$1, ToggleButtonGroupProps, Key } from 'react-aria-components';
1
+ import { ButtonProps as ButtonProps$1, LinkProps as LinkProps$1, ToggleButtonProps as ToggleButtonProps$1, TextFieldProps, TextField, ColorField, SelectProps as SelectProps$1, CellProps as CellProps$1, ColumnProps as ColumnProps$1, TableProps, RowProps as RowProps$1, TableBodyProps, TableHeaderProps, CheckboxProps as CheckboxProps$1, SwitchFieldProps, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, LabelProps as LabelProps$1, Selection, PressEvent, PopoverProps as PopoverProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps as TabPanelProps$1, TabsProps as TabsProps$1, ToggleButtonGroupProps, Key } from 'react-aria-components';
2
2
  export { Key, RouterConfig, RouterProvider, Tab as UnstyledTab, TabList as UnstyledTabList, TabPanel as UnstyledTabPanel, Tabs as UnstyledTabs } from 'react-aria-components';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as React$1 from 'react';
@@ -17,9 +17,14 @@ declare function Logo({ color, highlightColor, scale, className, }: LogoProps):
17
17
 
18
18
  type ButtonSize = "xs" | "sm" | "md" | "lg";
19
19
  type ButtonVariant = "primary" | "secondary" | "destructive" | "success" | "warning" | "info" | "neutral" | "outline" | "ghost";
20
+ declare const variantStyles: Record<ButtonVariant, string>;
21
+ /** Selected (toggled-on) background per variant — reuses each variant's pressed
22
+ * tone. Keyed on react-aria's `data-selected` (`selected:`), so it only takes
23
+ * effect on ToggleButton-backed components. Literal classes for Tailwind. */
24
+ declare const selectedStyles: Record<ButtonVariant, string>;
20
25
 
21
26
  /** Union of every registered icon name. */
22
- type IconName = "AlertCircle" | "AlertTriangle" | "AlignCenter" | "AlignLeft" | "AlignRight" | "Archive" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "ArrowUpRight" | "Ban" | "Bookmark" | "BookmarkCheck" | "Braces" | "Building2" | "Calendar" | "Check" | "CheckCircle" | "CheckCircle2" | "ChevronDown" | "ChevronRight" | "ChevronUp" | "Circle" | "CircleDot" | "CircleSlash" | "Clock" | "Cloud" | "Columns2" | "Columns3" | "Copy" | "CreditCard" | "Database" | "Download" | "Edit" | "EllipsisVertical" | "ExternalLink" | "Eye" | "EyeOff" | "File" | "FileSearch" | "FileSpreadsheet" | "FilterX" | "Folder" | "FolderPlus" | "FolderTree" | "Fullscreen" | "Github" | "Grid2x2" | "Grid3x3" | "Hand" | "Heart" | "Image" | "ImageOff" | "Inbox" | "Info" | "KeyRound" | "Lasso" | "Layers" | "Layers2" | "LayoutDashboard" | "LayoutGrid" | "Linkedin" | "List" | "ListFilter" | "LogOut" | "Mail" | "MapPin" | "Maximize" | "Menu" | "Microscope" | "Minus" | "MoreVertical" | "Move" | "Network" | "PanelLeftClose" | "PanelLeftOpen" | "PanelRightClose" | "PanelRightOpen" | "Pencil" | "Pentagon" | "Plug" | "Plus" | "Power" | "PowerOff" | "RefreshCw" | "RotateCcw" | "RotateCw" | "ScrollText" | "Search" | "SearchX" | "Send" | "Settings" | "Shield" | "ShieldCheck" | "Spline" | "Square" | "SquarePen" | "Star" | "Table" | "Tag" | "Trash2" | "Unplug" | "User" | "UserMinus" | "UserPlus" | "Users" | "UsersRound" | "X" | "XCircle" | "ZoomIn" | "ZoomOut";
27
+ type IconName = "AlertCircle" | "AlertTriangle" | "AlignCenter" | "AlignLeft" | "AlignRight" | "Archive" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "ArrowUpRight" | "Ban" | "Bookmark" | "BookmarkCheck" | "Braces" | "Building2" | "Calendar" | "Check" | "CheckCircle" | "CheckCircle2" | "ChevronDown" | "ChevronRight" | "ChevronUp" | "Circle" | "CircleDot" | "CircleSlash" | "Clock" | "Cloud" | "Columns2" | "Columns3" | "Copy" | "CreditCard" | "Crosshair" | "Database" | "Download" | "Edit" | "EllipsisVertical" | "ExternalLink" | "Eye" | "EyeOff" | "File" | "FileSearch" | "FileSpreadsheet" | "FilterX" | "Folder" | "FolderPlus" | "FolderTree" | "Fullscreen" | "Github" | "Grid2x2" | "Grid3x3" | "Hand" | "Heart" | "Image" | "ImageOff" | "Inbox" | "Info" | "KeyRound" | "Lasso" | "Layers" | "Layers2" | "LayoutDashboard" | "LayoutGrid" | "Linkedin" | "List" | "ListFilter" | "LogOut" | "Mail" | "MapPin" | "Maximize" | "Menu" | "Microscope" | "Minus" | "MoreVertical" | "Move" | "Network" | "PanelLeftClose" | "PanelLeftOpen" | "PanelRightClose" | "PanelRightOpen" | "Pencil" | "Pentagon" | "Plug" | "Plus" | "Power" | "PowerOff" | "RefreshCw" | "RotateCcw" | "RotateCw" | "ScrollText" | "Search" | "SearchX" | "Send" | "Settings" | "Shield" | "ShieldCheck" | "Spline" | "Square" | "SquarePen" | "Star" | "Table" | "Tag" | "Trash2" | "Unplug" | "User" | "UserMinus" | "UserPlus" | "Users" | "UsersRound" | "X" | "XCircle" | "ZoomIn" | "ZoomOut";
23
28
  /**
24
29
  * Allowlist of icons available by name. Keys mirror the Lucide export name so
25
30
  * call sites read `<Icon icon="Search" />`. Add an entry here (and to IconName
@@ -41,6 +46,8 @@ interface IconProps {
41
46
  /** An icon rendered at one of the design system's preset sizes. */
42
47
  declare function Icon({ icon, size, strokeWidth, className, }: IconProps): react_jsx_runtime.JSX.Element;
43
48
 
49
+ /** Layout, shape and state classes shared by the text buttons (Button, ButtonLink). */
50
+ declare const buttonBaseClass = "\n inline-flex items-center justify-center gap-2 shrink-0 cursor-pointer\n rounded-full\n font-medium\n leading-none\n outline-none transition-colors no-underline\n focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\n disabled:opacity-50 disabled:pointer-events-none\n";
44
51
  /** Shared visual props for the button family (Button, ButtonLink). */
45
52
  interface ButtonBaseProps {
46
53
  variant?: ButtonVariant;
@@ -178,6 +185,7 @@ type IconButtonLinkProps = Omit<ButtonLinkProps, "iconLeft" | "iconRight" | "chi
178
185
  ref?: Ref<HTMLAnchorElement>;
179
186
  };
180
187
  declare function IconButtonLink(props: IconButtonLinkProps): react_jsx_runtime.JSX.Element;
188
+ /** @deprecated Use IconButton with aria-pressed instead. No consumers remain. */
181
189
  type IconButtonToggleProps = Omit<ToggleButtonProps$1, "className" | "children"> & {
182
190
  icon: IconValue;
183
191
  label: string;
@@ -186,7 +194,7 @@ type IconButtonToggleProps = Omit<ToggleButtonProps$1, "className" | "children">
186
194
  isLoading?: boolean;
187
195
  ref?: Ref<HTMLButtonElement>;
188
196
  };
189
- /** Icon button with a persistent on/off state (react-aria ToggleButton): `isSelected` toggles `aria-pressed` and the selected background. */
197
+ /** @deprecated Use IconButton with aria-pressed instead. No consumers remain. */
190
198
  declare function IconButtonToggle(props: IconButtonToggleProps): react_jsx_runtime.JSX.Element;
191
199
 
192
200
  interface InputProps extends Omit<TextFieldProps, "children" | "className"> {
@@ -197,11 +205,12 @@ interface InputProps extends Omit<TextFieldProps, "children" | "className"> {
197
205
  errorMessage?: string;
198
206
  type?: "text" | "email" | "password" | "number";
199
207
  size?: ButtonSize;
200
- prefix?: string;
208
+ prefix?: ReactNode;
209
+ suffix?: ReactNode;
201
210
  align?: "left" | "center" | "right";
202
211
  className?: string;
203
212
  }
204
- declare function Input({ as: FieldProp, label, placeholder, description, errorMessage, type, size, prefix, align, isDisabled, isRequired, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
213
+ declare function Input({ as: FieldProp, label, placeholder, description, errorMessage, type, size, prefix, suffix, align, isDisabled, isRequired, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
205
214
 
206
215
  interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
207
216
  label?: string;
@@ -330,11 +339,9 @@ interface CheckboxProps extends Omit<CheckboxProps$1, "children" | "className">
330
339
  }
331
340
  declare function Checkbox({ children, className, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
332
341
 
333
- type PresetColor = "primary" | "success" | "destructive";
334
- interface SwitchProps extends Omit<SwitchProps$1, "children" | "className"> {
342
+ interface SwitchProps extends Omit<SwitchFieldProps, "children" | "className"> {
335
343
  children?: React__default.ReactNode;
336
- /** Preset color name or any valid CSS color string for the track when selected */
337
- color?: PresetColor | (string & {});
344
+ color?: string;
338
345
  className?: string;
339
346
  }
340
347
  declare function Switch({ children, color, className, ...props }: SwitchProps): react_jsx_runtime.JSX.Element;
@@ -769,6 +776,10 @@ interface PathPillProps {
769
776
  }
770
777
  declare function PathPill({ children, visibleCount, colorFn, className, }: PathPillProps): react_jsx_runtime.JSX.Element | null;
771
778
 
779
+ interface MetricTextProps extends React__default.HTMLAttributes<HTMLSpanElement> {
780
+ }
781
+ declare function MetricText({ className, ...rest }: MetricTextProps): react_jsx_runtime.JSX.Element;
782
+
772
783
  interface FormWizardContextValue {
773
784
  /** Zero-based index of the currently active step */
774
785
  currentStep: number;
@@ -810,4 +821,4 @@ interface FormWizardNavProps {
810
821
  }
811
822
  declare function FormWizardNav({ onNext, isSubmitting, submitLabel, }: FormWizardNavProps): react_jsx_runtime.JSX.Element;
812
823
 
813
- export { Badge, type BadgeColor, type BadgeProps, type BadgeSize, Banner, type BannerProps, type BannerVariant, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, Cell, Checkbox, type CheckboxProps, Column, type DataTableProps, type DeltaFormat, DeltaIndicator, type DeltaIndicatorProps, type DeltaMode, Description, DescriptionList, type DescriptionListItemProps, type DescriptionListLayout, type DescriptionListProps, type DescriptionProps, type DescriptionSize, Dialog, type DialogProps, EmptyState, type EmptyStateProps, Fieldset, type FieldsetProps, FormWizard, type FormWizardContextValue, FormWizardNav, type FormWizardNavProps, FormWizardProgress, type FormWizardProgressProps, type FormWizardProps, H1, H2, H3, H4, H5, H6, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, IconButtonLink, type IconButtonLinkProps, type IconButtonProps, IconButtonToggle, type IconButtonToggleProps, type IconComponent, type IconName, type IconProps, type IconValue, Input, InputPassword, type InputPasswordProps, type InputProps, Label, type LabelProps, Link, type LinkProps, type LinkVariant, Logo, type LogoProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuHeader, type MenuHeaderProps, MenuItem, type MenuItemData, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, MetricCard, type MetricCardProps, type MetricCardSize, PathPill, type PathPillProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant, Prose, type ProseProps, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Row, SectionHeader, type SectionHeaderProps, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, type SegmentedControlSelectionMode, type SegmentedControlSize, Select, type SelectItem, type SelectProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, type ToastBridge, type ToastContextValue, type ToastData, type ToastPlacement, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleButton, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonVariant, Tooltip, type TooltipProps, TruncatedText, type TruncatedTextProps, type UseContextMenuProps, type UseContextMenuResult, createToastBridge, iconRegistry, pillColorFromName, useContextMenu, useFormWizard, useToast };
824
+ export { Badge, type BadgeColor, type BadgeProps, type BadgeSize, Banner, type BannerProps, type BannerVariant, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, Cell, Checkbox, type CheckboxProps, Column, type DataTableProps, type DeltaFormat, DeltaIndicator, type DeltaIndicatorProps, type DeltaMode, Description, DescriptionList, type DescriptionListItemProps, type DescriptionListLayout, type DescriptionListProps, type DescriptionProps, type DescriptionSize, Dialog, type DialogProps, EmptyState, type EmptyStateProps, Fieldset, type FieldsetProps, FormWizard, type FormWizardContextValue, FormWizardNav, type FormWizardNavProps, FormWizardProgress, type FormWizardProgressProps, type FormWizardProps, H1, H2, H3, H4, H5, H6, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, IconButtonLink, type IconButtonLinkProps, type IconButtonProps, IconButtonToggle, type IconButtonToggleProps, type IconComponent, type IconName, type IconProps, type IconValue, Input, InputPassword, type InputPasswordProps, type InputProps, Label, type LabelProps, Link, type LinkProps, type LinkVariant, Logo, type LogoProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuHeader, type MenuHeaderProps, MenuItem, type MenuItemData, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, MetricCard, type MetricCardProps, type MetricCardSize, MetricText, type MetricTextProps, PathPill, type PathPillProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant, Prose, type ProseProps, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Row, SectionHeader, type SectionHeaderProps, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, type SegmentedControlSelectionMode, type SegmentedControlSize, Select, type SelectItem, type SelectProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, type ToastBridge, type ToastContextValue, type ToastData, type ToastPlacement, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleButton, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonVariant, Tooltip, type TooltipProps, TruncatedText, type TruncatedTextProps, type UseContextMenuProps, type UseContextMenuResult, buttonBaseClass, createToastBridge, iconRegistry, pillColorFromName, selectedStyles, useContextMenu, useFormWizard, useToast, variantStyles };