@cytario/design 1.13.0 → 1.14.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 +121 -2
- package/dist/index.js +385 -94
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -619,7 +619,7 @@ declare function Banner({ children, variant, title, icon, dismissible, onDismiss
|
|
|
619
619
|
type MetricCardSize = "sm" | "md";
|
|
620
620
|
interface MetricCardProps {
|
|
621
621
|
/** Metric label (e.g., "Total Spend") */
|
|
622
|
-
label:
|
|
622
|
+
label: React__default.ReactNode;
|
|
623
623
|
/** Primary value (formatted string or component) */
|
|
624
624
|
value: React__default.ReactNode;
|
|
625
625
|
/** Secondary content rendered below the value */
|
|
@@ -633,6 +633,125 @@ interface MetricCardProps {
|
|
|
633
633
|
}
|
|
634
634
|
declare function MetricCard({ label, value, secondary, href, size, className, }: MetricCardProps): react_jsx_runtime.JSX.Element;
|
|
635
635
|
|
|
636
|
+
interface SectionHeaderProps {
|
|
637
|
+
/** Section title rendered as an H2 heading */
|
|
638
|
+
title: string;
|
|
639
|
+
/** Optional action elements (buttons, badges, etc.) rendered on the right */
|
|
640
|
+
children?: React__default.ReactNode;
|
|
641
|
+
/** Additional CSS classes applied to the outer container */
|
|
642
|
+
className?: string;
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Section header with a title on the left and optional action slots on the right.
|
|
646
|
+
*
|
|
647
|
+
* Mirrors the `SectionHeader` pattern from cytario-web's `Container.tsx`.
|
|
648
|
+
* The title renders as an `<H2>` heading; any `children` are placed in a
|
|
649
|
+
* flex container that aligns to the trailing edge.
|
|
650
|
+
*/
|
|
651
|
+
declare function SectionHeader({ title, children, className, }: SectionHeaderProps): react_jsx_runtime.JSX.Element;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Available pill color variants, mapped to existing badge design tokens.
|
|
655
|
+
*
|
|
656
|
+
* The seven base variants correspond 1:1 to the `--color-badge-*` token set
|
|
657
|
+
* defined in `tokens/semantic.json`.
|
|
658
|
+
*/
|
|
659
|
+
type PillColor = "neutral" | "purple" | "teal" | "rose" | "slate" | "green" | "amber";
|
|
660
|
+
interface PillProps {
|
|
661
|
+
/** Pill label content */
|
|
662
|
+
children: React__default.ReactNode;
|
|
663
|
+
/**
|
|
664
|
+
* Explicit color variant, or `"auto"` to derive from `name` via
|
|
665
|
+
* deterministic hash. Defaults to `"auto"` when `name` is provided,
|
|
666
|
+
* `"neutral"` otherwise.
|
|
667
|
+
*/
|
|
668
|
+
color?: PillColor | "auto";
|
|
669
|
+
/**
|
|
670
|
+
* String used for deterministic hash-based color assignment.
|
|
671
|
+
* When provided and `color` is `"auto"` (or omitted), the pill color
|
|
672
|
+
* is derived from this value so the same name always produces the same
|
|
673
|
+
* color across renders and sessions.
|
|
674
|
+
*/
|
|
675
|
+
name?: string;
|
|
676
|
+
/** Additional CSS class names merged via tailwind-merge */
|
|
677
|
+
className?: string;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Deterministic string-to-color hash, matching the algorithm used in
|
|
681
|
+
* cytario-web's `Pill.tsx`.
|
|
682
|
+
*/
|
|
683
|
+
declare function pillColorFromName(name: string): PillColor;
|
|
684
|
+
/**
|
|
685
|
+
* Pill -- a small, rounded label used for tags, user groups, and status
|
|
686
|
+
* indicators. Supports deterministic hash-based coloring so the same
|
|
687
|
+
* `name` always renders the same color.
|
|
688
|
+
*/
|
|
689
|
+
declare function Pill({ children, color, name, className }: PillProps): react_jsx_runtime.JSX.Element;
|
|
690
|
+
|
|
691
|
+
interface GroupPillProps {
|
|
692
|
+
/**
|
|
693
|
+
* Slash-separated group path, e.g. `"/org/team/admins"`.
|
|
694
|
+
* Leading slash is optional and stripped before splitting.
|
|
695
|
+
*/
|
|
696
|
+
path: string;
|
|
697
|
+
/**
|
|
698
|
+
* Maximum number of path segments to display as full pills.
|
|
699
|
+
* Extra leading segments are collapsed into small colored dots.
|
|
700
|
+
* @default 3
|
|
701
|
+
*/
|
|
702
|
+
visibleCount?: number;
|
|
703
|
+
/** Additional CSS class names merged via tailwind-merge */
|
|
704
|
+
className?: string;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* GroupPill -- displays a hierarchical group path as a row of
|
|
708
|
+
* deterministically-colored pills. When the path has more segments
|
|
709
|
+
* than `visibleCount`, the leading overflow segments are shown as
|
|
710
|
+
* small colored dots to preserve context without consuming space.
|
|
711
|
+
*/
|
|
712
|
+
declare function GroupPill({ path, visibleCount, className, }: GroupPillProps): react_jsx_runtime.JSX.Element | null;
|
|
713
|
+
|
|
714
|
+
interface FormWizardContextValue {
|
|
715
|
+
/** Zero-based index of the currently active step */
|
|
716
|
+
currentStep: number;
|
|
717
|
+
/** Total number of steps in the wizard */
|
|
718
|
+
totalSteps: number;
|
|
719
|
+
/** Whether the user can navigate backwards */
|
|
720
|
+
canGoBack: boolean;
|
|
721
|
+
/** Navigate to the previous step */
|
|
722
|
+
goBack: () => void;
|
|
723
|
+
/** Whether the current step is the last step */
|
|
724
|
+
isLastStep: boolean;
|
|
725
|
+
}
|
|
726
|
+
declare function useFormWizard(): FormWizardContextValue;
|
|
727
|
+
interface FormWizardProps {
|
|
728
|
+
/** Zero-based index of the currently active step */
|
|
729
|
+
currentStep: number;
|
|
730
|
+
/** Total number of steps in the wizard */
|
|
731
|
+
totalSteps: number;
|
|
732
|
+
/** Callback invoked when the step should change */
|
|
733
|
+
onStepChange: (step: number) => void;
|
|
734
|
+
/** Wizard content (step panels, progress indicator, navigation) */
|
|
735
|
+
children: React__default.ReactNode;
|
|
736
|
+
}
|
|
737
|
+
declare function FormWizard({ currentStep, totalSteps, onStepChange, children, }: FormWizardProps): react_jsx_runtime.JSX.Element;
|
|
738
|
+
|
|
739
|
+
interface FormWizardProgressProps {
|
|
740
|
+
/** Labels for each step, displayed below the step circles */
|
|
741
|
+
labels: string[];
|
|
742
|
+
}
|
|
743
|
+
declare function FormWizardProgress({ labels }: FormWizardProgressProps): react_jsx_runtime.JSX.Element;
|
|
744
|
+
|
|
745
|
+
interface FormWizardNavProps {
|
|
746
|
+
/** Callback invoked when the user presses Next or Submit */
|
|
747
|
+
onNext: () => void;
|
|
748
|
+
/** Whether the form is currently submitting (shows loading state on the submit button) */
|
|
749
|
+
isSubmitting?: boolean;
|
|
750
|
+
/** Label for the submit button on the last step (defaults to "Submit") */
|
|
751
|
+
submitLabel?: string;
|
|
752
|
+
}
|
|
753
|
+
declare function FormWizardNav({ onNext, isSubmitting, submitLabel, }: FormWizardNavProps): react_jsx_runtime.JSX.Element;
|
|
754
|
+
|
|
636
755
|
/**
|
|
637
756
|
* Do not edit directly, this file was auto-generated.
|
|
638
757
|
*/
|
|
@@ -839,4 +958,4 @@ declare const LineHeightTight = 1.25;
|
|
|
839
958
|
declare const LineHeightNormal = 1.5;
|
|
840
959
|
declare const LineHeightRelaxed = 1.625;
|
|
841
960
|
|
|
842
|
-
export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BorderRadiusFull, BorderRadiusLg, BorderRadiusMd, BorderRadiusNone, BorderRadiusSm, BorderRadiusXl, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, Cell, Checkbox, type CheckboxProps, ColorActionDanger, ColorActionDangerHover, ColorActionDefault, ColorActionDefaultHover, ColorActionInfo, ColorActionInfoHover, ColorActionPrimary, ColorActionPrimaryActive, ColorActionPrimaryHover, ColorActionSecondary, ColorActionSecondaryHover, ColorActionSuccess, ColorActionSuccessHover, ColorAmber100, ColorAmber200, ColorAmber300, ColorAmber400, ColorAmber50, ColorAmber500, ColorAmber600, ColorAmber700, ColorAmber800, ColorAmber900, ColorBadgeAmberBg, ColorBadgeAmberText, ColorBadgeGreenBg, ColorBadgeGreenText, ColorBadgeNeutralBg, ColorBadgeNeutralText, ColorBadgePurpleBg, ColorBadgePurpleText, ColorBadgeRoseBg, ColorBadgeRoseText, ColorBadgeSlateBg, ColorBadgeSlateText, ColorBadgeTealBg, ColorBadgeTealText, ColorBannerDangerBg, ColorBannerDangerBorder, ColorBannerDangerIcon, ColorBannerDangerText, ColorBannerInfoBg, ColorBannerInfoBorder, ColorBannerInfoIcon, ColorBannerInfoText, ColorBannerSuccessBg, ColorBannerSuccessBorder, ColorBannerSuccessIcon, ColorBannerSuccessText, ColorBannerWarningBg, ColorBannerWarningBorder, ColorBannerWarningIcon, ColorBannerWarningText, ColorBorderAccent, ColorBorderBrand, ColorBorderDanger, ColorBorderDefault, ColorBorderFocus, ColorBorderInfo, ColorBorderStrong, ColorBorderSuccess, ColorBorderWarning, ColorBrandAccent, ColorBrandPrimary, ColorDeltaDecreaseBg, ColorDeltaDecreaseIcon, ColorDeltaDecreaseText, ColorDeltaFlatBg, ColorDeltaFlatIcon, ColorDeltaFlatText, ColorDeltaIncreaseBg, ColorDeltaIncreaseIcon, ColorDeltaIncreaseText, ColorGreen100, ColorGreen200, ColorGreen300, ColorGreen400, ColorGreen50, ColorGreen500, ColorGreen600, ColorGreen700, ColorGreen800, ColorGreen900, ColorNeutral0, ColorNeutral100, ColorNeutral1000, ColorNeutral200, ColorNeutral300, ColorNeutral400, ColorNeutral50, ColorNeutral500, ColorNeutral600, ColorNeutral700, ColorNeutral800, ColorNeutral900, ColorNeutral950, ColorOverlayBackdrop, ColorProgressFill, ColorProgressFillDanger, ColorProgressFillSuccess, ColorProgressFillWarning, ColorProgressTrack, ColorPurple100, ColorPurple200, ColorPurple300, ColorPurple400, ColorPurple50, ColorPurple500, ColorPurple600, ColorPurple700, ColorPurple800, ColorPurple900, ColorRose100, ColorRose200, ColorRose300, ColorRose400, ColorRose50, ColorRose500, ColorRose600, ColorRose700, ColorRose800, ColorRose900, ColorSlate100, ColorSlate200, ColorSlate300, ColorSlate400, ColorSlate50, ColorSlate500, ColorSlate600, ColorSlate700, ColorSlate800, ColorSlate900, ColorStatusDanger, ColorStatusInfo, ColorStatusSuccess, ColorStatusWarning, ColorSurfaceAccent, ColorSurfaceBrand, ColorSurfaceDanger, ColorSurfaceDefault, ColorSurfaceHover, ColorSurfaceInfo, ColorSurfaceMuted, ColorSurfaceOverlay, ColorSurfacePressed, ColorSurfaceSelected, ColorSurfaceSelectedHover, ColorSurfaceSubtle, ColorSurfaceSuccess, ColorSurfaceWarning, ColorTeal100, ColorTeal200, ColorTeal300, ColorTeal400, ColorTeal50, ColorTeal500, ColorTeal600, ColorTeal700, ColorTeal800, ColorTeal900, ColorTextAccent, ColorTextBrand, ColorTextDanger, ColorTextInfo, ColorTextInverse, ColorTextPrimary, ColorTextSecondary, ColorTextSuccess, ColorTextTertiary, ColorTextWarning, Column, type DataTableProps, type DeltaFormat, DeltaIndicator, type DeltaIndicatorProps, type DeltaMode, Dialog, type DialogProps, EmptyState, type EmptyStateProps, Field, type FieldProps, Fieldset, type FieldsetProps, FontSize2xl, FontSize3xl, FontSize4xl, FontSize5xl, FontSizeBase, FontSizeLg, FontSizeSm, FontSizeXl, FontSizeXs, FontWeightBold, FontWeightExtrabold, FontWeightLight, FontWeightMedium, FontWeightRegular, FontWeightSemibold, type GroupPosition, H1, H2, H3, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, IconButtonLink, type IconButtonLinkProps, type IconButtonProps, type IconProps, Input, InputAddon, type InputAddonProps, InputGroup, InputGroupContext, type InputGroupProps, type InputProps, Label, type LabelProps, LineHeightNormal, LineHeightRelaxed, LineHeightTight, Link, type LinkProps, type LinkVariant, Menu, type MenuItemData, type MenuProps, MetricCard, type MetricCardProps, type MetricCardSize, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Row, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, type SegmentedControlSelectionMode, type SegmentedControlSize, Select, type SelectItem, type SelectProps, Spacing1, Spacing12, Spacing16, Spacing2, Spacing3, Spacing4, Spacing6, Spacing8, Spinner, type SpinnerProps, StorageConnectionCard, type StorageConnectionCardProps, 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, ToastProvider, type ToastVariant, ToggleButton, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonVariant, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, createToastBridge, useInputGroup, useToast };
|
|
961
|
+
export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BorderRadiusFull, BorderRadiusLg, BorderRadiusMd, BorderRadiusNone, BorderRadiusSm, BorderRadiusXl, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, Cell, Checkbox, type CheckboxProps, ColorActionDanger, ColorActionDangerHover, ColorActionDefault, ColorActionDefaultHover, ColorActionInfo, ColorActionInfoHover, ColorActionPrimary, ColorActionPrimaryActive, ColorActionPrimaryHover, ColorActionSecondary, ColorActionSecondaryHover, ColorActionSuccess, ColorActionSuccessHover, ColorAmber100, ColorAmber200, ColorAmber300, ColorAmber400, ColorAmber50, ColorAmber500, ColorAmber600, ColorAmber700, ColorAmber800, ColorAmber900, ColorBadgeAmberBg, ColorBadgeAmberText, ColorBadgeGreenBg, ColorBadgeGreenText, ColorBadgeNeutralBg, ColorBadgeNeutralText, ColorBadgePurpleBg, ColorBadgePurpleText, ColorBadgeRoseBg, ColorBadgeRoseText, ColorBadgeSlateBg, ColorBadgeSlateText, ColorBadgeTealBg, ColorBadgeTealText, ColorBannerDangerBg, ColorBannerDangerBorder, ColorBannerDangerIcon, ColorBannerDangerText, ColorBannerInfoBg, ColorBannerInfoBorder, ColorBannerInfoIcon, ColorBannerInfoText, ColorBannerSuccessBg, ColorBannerSuccessBorder, ColorBannerSuccessIcon, ColorBannerSuccessText, ColorBannerWarningBg, ColorBannerWarningBorder, ColorBannerWarningIcon, ColorBannerWarningText, ColorBorderAccent, ColorBorderBrand, ColorBorderDanger, ColorBorderDefault, ColorBorderFocus, ColorBorderInfo, ColorBorderStrong, ColorBorderSuccess, ColorBorderWarning, ColorBrandAccent, ColorBrandPrimary, ColorDeltaDecreaseBg, ColorDeltaDecreaseIcon, ColorDeltaDecreaseText, ColorDeltaFlatBg, ColorDeltaFlatIcon, ColorDeltaFlatText, ColorDeltaIncreaseBg, ColorDeltaIncreaseIcon, ColorDeltaIncreaseText, ColorGreen100, ColorGreen200, ColorGreen300, ColorGreen400, ColorGreen50, ColorGreen500, ColorGreen600, ColorGreen700, ColorGreen800, ColorGreen900, ColorNeutral0, ColorNeutral100, ColorNeutral1000, ColorNeutral200, ColorNeutral300, ColorNeutral400, ColorNeutral50, ColorNeutral500, ColorNeutral600, ColorNeutral700, ColorNeutral800, ColorNeutral900, ColorNeutral950, ColorOverlayBackdrop, ColorProgressFill, ColorProgressFillDanger, ColorProgressFillSuccess, ColorProgressFillWarning, ColorProgressTrack, ColorPurple100, ColorPurple200, ColorPurple300, ColorPurple400, ColorPurple50, ColorPurple500, ColorPurple600, ColorPurple700, ColorPurple800, ColorPurple900, ColorRose100, ColorRose200, ColorRose300, ColorRose400, ColorRose50, ColorRose500, ColorRose600, ColorRose700, ColorRose800, ColorRose900, ColorSlate100, ColorSlate200, ColorSlate300, ColorSlate400, ColorSlate50, ColorSlate500, ColorSlate600, ColorSlate700, ColorSlate800, ColorSlate900, ColorStatusDanger, ColorStatusInfo, ColorStatusSuccess, ColorStatusWarning, ColorSurfaceAccent, ColorSurfaceBrand, ColorSurfaceDanger, ColorSurfaceDefault, ColorSurfaceHover, ColorSurfaceInfo, ColorSurfaceMuted, ColorSurfaceOverlay, ColorSurfacePressed, ColorSurfaceSelected, ColorSurfaceSelectedHover, ColorSurfaceSubtle, ColorSurfaceSuccess, ColorSurfaceWarning, ColorTeal100, ColorTeal200, ColorTeal300, ColorTeal400, ColorTeal50, ColorTeal500, ColorTeal600, ColorTeal700, ColorTeal800, ColorTeal900, ColorTextAccent, ColorTextBrand, ColorTextDanger, ColorTextInfo, ColorTextInverse, ColorTextPrimary, ColorTextSecondary, ColorTextSuccess, ColorTextTertiary, ColorTextWarning, Column, type DataTableProps, type DeltaFormat, DeltaIndicator, type DeltaIndicatorProps, type DeltaMode, Dialog, type DialogProps, EmptyState, type EmptyStateProps, Field, type FieldProps, Fieldset, type FieldsetProps, FontSize2xl, FontSize3xl, FontSize4xl, FontSize5xl, FontSizeBase, FontSizeLg, FontSizeSm, FontSizeXl, FontSizeXs, FontWeightBold, FontWeightExtrabold, FontWeightLight, FontWeightMedium, FontWeightRegular, FontWeightSemibold, FormWizard, type FormWizardContextValue, FormWizardNav, type FormWizardNavProps, FormWizardProgress, type FormWizardProgressProps, type FormWizardProps, GroupPill, type GroupPillProps, type GroupPosition, H1, H2, H3, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, IconButtonLink, type IconButtonLinkProps, type IconButtonProps, type IconProps, Input, InputAddon, type InputAddonProps, InputGroup, InputGroupContext, type InputGroupProps, type InputProps, Label, type LabelProps, LineHeightNormal, LineHeightRelaxed, LineHeightTight, Link, type LinkProps, type LinkVariant, Menu, type MenuItemData, type MenuProps, MetricCard, type MetricCardProps, type MetricCardSize, Pill, type PillColor, type PillProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant, 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, Spacing1, Spacing12, Spacing16, Spacing2, Spacing3, Spacing4, Spacing6, Spacing8, Spinner, type SpinnerProps, StorageConnectionCard, type StorageConnectionCardProps, 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, ToastProvider, type ToastVariant, ToggleButton, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonVariant, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, createToastBridge, pillColorFromName, useFormWizard, useInputGroup, useToast };
|