@sofya-ds/react 1.9.0 → 1.11.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
@@ -16,11 +16,11 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
16
16
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
17
17
  import * as SelectPrimitive from '@radix-ui/react-select';
18
18
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
19
- import { ToasterProps as ToasterProps$1 } from 'sonner';
19
+ import { ExternalToast, ToasterProps as ToasterProps$1, toast } from 'sonner';
20
20
  export { ExternalToast, ToastClassnames, toast } from 'sonner';
21
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
21
22
  import * as SwitchPrimitives from '@radix-ui/react-switch';
22
23
  import * as TabsPrimitive from '@radix-ui/react-tabs';
23
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
24
24
 
25
25
  declare const avatarSizeOptions: readonly ["sm", "default", "lg"];
26
26
  declare const avatarVariants: (props?: ({
@@ -65,6 +65,12 @@ declare const alertVariants: (props?: ({
65
65
  interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
66
66
  icon?: React.ReactNode;
67
67
  showToneIcon?: boolean;
68
+ /**
69
+ * When provided, renders the single canonical close button. Omit for
70
+ * non-dismissible alerts so no close affordance is shown.
71
+ */
72
+ onDismiss?: () => void;
73
+ dismissLabel?: string;
68
74
  }
69
75
  declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
70
76
  declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -98,7 +104,7 @@ declare const buttonVariantOptions: readonly ["default", "gradient", "dropdown",
98
104
  declare const buttonSizeOptions: readonly ["default", "sm", "lg", "icon"];
99
105
 
100
106
  declare const buttonVariants: (props?: ({
101
- variant?: "default" | "destructive" | "icon" | "secondary" | "gradient" | "outline" | "dropdown" | "language" | "ghost" | null | undefined;
107
+ variant?: "default" | "destructive" | "icon" | "secondary" | "gradient" | "dropdown" | "language" | "outline" | "ghost" | null | undefined;
102
108
  size?: "sm" | "default" | "lg" | "icon" | null | undefined;
103
109
  } & class_variance_authority_types.ClassProp) | undefined) => string;
104
110
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -138,11 +144,32 @@ declare function CardFooter({ children, className, ...props }: React.HTMLAttribu
138
144
  interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
139
145
  description?: React.ReactNode;
140
146
  descriptionClassName?: string;
147
+ /** Renders the mixed/indeterminate state (sets the native flag). */
148
+ indeterminate?: boolean;
149
+ /** Renders the error state with a destructive border/ring. */
150
+ error?: boolean;
141
151
  label?: React.ReactNode;
142
152
  labelClassName?: string;
143
153
  }
144
154
  declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
145
155
 
156
+ interface CloseButtonProps extends Omit<ButtonProps, "variant" | "leftIcon" | "rightIcon" | "children"> {
157
+ /** Accessible label. Defaults to "Fechar". */
158
+ label?: string;
159
+ /** Icon size in px. */
160
+ iconSize?: number;
161
+ }
162
+ /**
163
+ * The single, canonical close affordance for the design system.
164
+ *
165
+ * It is always a flat ghost icon button on a transparent background — never a
166
+ * solid/black surface — with a required accessible label and the standard
167
+ * hover/active/focus-visible/disabled states inherited from `Button`. Dialogs,
168
+ * popovers and notices should all use this component so there is exactly one
169
+ * close model across the system.
170
+ */
171
+ declare const CloseButton: React.ForwardRefExoticComponent<CloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
172
+
146
173
  declare const dropdownVariantOptions: readonly ["card", "language", "selected", "action"];
147
174
  type DropdownVariant = (typeof dropdownVariantOptions)[number];
148
175
  declare const dropdownAppearanceOptions: readonly ["card"];
@@ -324,6 +351,19 @@ declare const legacyIconToTablerNameMap: {
324
351
  readonly lixeira: "IconTrash";
325
352
  readonly settings: "IconSettings";
326
353
  readonly edit: "IconEdit";
354
+ readonly bold: "IconBold";
355
+ readonly italic: "IconItalic";
356
+ readonly underline: "IconUnderline";
357
+ readonly strikethrough: "IconStrikethrough";
358
+ readonly "list-bullet": "IconList";
359
+ readonly "list-numbers": "IconListNumbers";
360
+ readonly link: "IconLink";
361
+ readonly quote: "IconQuote";
362
+ readonly code: "IconCode";
363
+ readonly "align-left": "IconAlignLeft";
364
+ readonly "align-center": "IconAlignCenter";
365
+ readonly "align-right": "IconAlignRight";
366
+ readonly "align-justify": "IconAlignJustified";
327
367
  };
328
368
  type IconName = keyof typeof legacyIconToTablerNameMap;
329
369
  declare const iconNames: IconName[];
@@ -359,6 +399,29 @@ declare const Icon: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGSVGEl
359
399
  name: IconName;
360
400
  } & React.RefAttributes<SVGSVGElement>>;
361
401
 
402
+ declare const iconButtonVariantOptions: readonly ["ghost", "subtle", "solid", "destructive"];
403
+ declare const iconButtonSizeOptions: readonly ["sm", "md", "lg"];
404
+ type IconButtonVariant = (typeof iconButtonVariantOptions)[number];
405
+ type IconButtonSize = (typeof iconButtonSizeOptions)[number];
406
+ interface IconButtonProps extends Omit<ButtonProps, "aria-label" | "children" | "leftIcon" | "rightIcon" | "size" | "variant"> {
407
+ /** Icon-only buttons must have an accessible label. */
408
+ "aria-label": string;
409
+ icon: React.ReactNode;
410
+ variant?: IconButtonVariant;
411
+ size?: IconButtonSize;
412
+ /**
413
+ * Toggle/selected state. When provided, the button exposes `aria-pressed`
414
+ * and the selected surface. Omit for plain (non-toggle) actions.
415
+ */
416
+ selected?: boolean;
417
+ }
418
+ /**
419
+ * Icon-only action button. Flat/ghost by default so it never paints an
420
+ * unwanted background on light surfaces (rails, tabs, settings, table actions),
421
+ * with a fixed square footprint (32x32 by default) for stable layouts.
422
+ */
423
+ declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
424
+
362
425
  declare const uploadKindOptions: readonly ["document", "image", "video"];
363
426
  type UploadKind = (typeof uploadKindOptions)[number];
364
427
  type InputBaseProps$1 = {
@@ -523,6 +586,20 @@ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.P
523
586
  declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
524
587
  declare const PopoverPortal: React.FC<PopoverPrimitive.PopoverPortalProps>;
525
588
  declare const PopoverClose: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
589
+ /**
590
+ * Opt-in close button for popovers, aligned to the top-right of the content.
591
+ * Popovers never render a close by default — only mount this when the popover
592
+ * genuinely needs a dismiss affordance, so there is never a duplicated close.
593
+ */
594
+ declare const PopoverCloseButton: React.ForwardRefExoticComponent<CloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
595
+ /**
596
+ * `PopoverContent` is a transient overlay surface. Per the flat visual
597
+ * contract it never uses the heavy brand shadows (`--sofya-shadow-sofya-*`).
598
+ * `--sofya-shadow-soft` is the single, official, minimal elevation used to lift
599
+ * transient surfaces (popover / dropdown / toast) off the page; visual
600
+ * separation is also reinforced by the surface border. Pass `shadow-none` via
601
+ * `className` to opt out entirely.
602
+ */
526
603
  declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
527
604
  declare const PopoverTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
528
605
  declare const PopoverDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
@@ -599,11 +676,41 @@ type RadioGroupComponent = typeof RadioGroupRoot & {
599
676
  };
600
677
  declare const RadioGroup: RadioGroupComponent;
601
678
 
602
- interface RightRailActionProps extends Omit<ButtonProps, "aria-label" | "children" | "leftIcon" | "rightIcon" | "size" | "variant"> {
679
+ interface RichTextToolbarProps extends React.HTMLAttributes<HTMLDivElement> {
680
+ /** Accessible name for the toolbar. */
681
+ "aria-label"?: string;
682
+ /** Reflects whether the bound editor currently has focus. */
683
+ editorFocused?: boolean;
684
+ }
685
+ /**
686
+ * Text editor toolbar. A flat, token-based `role="toolbar"` container that
687
+ * holds standardized icon buttons. It highlights when the bound editor is
688
+ * focused (`editorFocused`) and when focus is inside the toolbar itself.
689
+ */
690
+ declare const RichTextToolbar: React.ForwardRefExoticComponent<RichTextToolbarProps & React.RefAttributes<HTMLDivElement>>;
691
+ declare const RichTextToolbarGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
692
+ declare const RichTextToolbarSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
693
+ interface RichTextToolbarButtonProps extends Omit<IconButtonProps, "selected" | "variant"> {
694
+ /** Whether the tool is currently applied (active/pressed). */
695
+ active?: boolean;
696
+ }
697
+ /**
698
+ * A single toolbar tool. Built on the standardized `IconButton`, so it shares
699
+ * the same flat ghost treatment, fixed size, and required `aria-label`. The
700
+ * `active` flag exposes the pressed state via `aria-pressed`.
701
+ */
702
+ declare const RichTextToolbarButton: React.ForwardRefExoticComponent<RichTextToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
703
+
704
+ interface RightRailActionProps extends Omit<IconButtonProps, "aria-label" | "icon" | "selected" | "size" | "variant"> {
603
705
  "aria-label": string;
604
706
  active?: boolean;
605
707
  icon: React.ReactNode;
606
708
  }
709
+ /**
710
+ * Right-rail action. Flat/ghost by default so the rail never competes with
711
+ * table or content actions on light surfaces; the selected surface only
712
+ * appears when `active`.
713
+ */
607
714
  declare const RightRailAction: React.ForwardRefExoticComponent<RightRailActionProps & React.RefAttributes<HTMLButtonElement>>;
608
715
 
609
716
  declare const scrollAreaOrientationOptions: readonly ["horizontal", "vertical"];
@@ -634,6 +741,28 @@ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimit
634
741
 
635
742
  declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
636
743
 
744
+ interface SidebarNavItemProps extends React.HTMLAttributes<HTMLElement> {
745
+ /** Render as a different element/component (e.g. a router Link). */
746
+ as?: React.ElementType;
747
+ /** Marks the item as the current/selected destination. */
748
+ active?: boolean;
749
+ disabled?: boolean;
750
+ /** Leading icon, kept vertically aligned with the label. */
751
+ icon?: React.ReactNode;
752
+ href?: string;
753
+ }
754
+ /**
755
+ * Lateral navigation item (settings / left sidebar).
756
+ *
757
+ * The selected state pairs a light surface background with a left indicator bar
758
+ * tinted with the primary token. The indicator is absolutely positioned and is
759
+ * always reserved in the layout (only its opacity toggles), so selecting an
760
+ * item never causes layout shift, and the icon/label stay aligned across every
761
+ * state.
762
+ */
763
+ declare const SidebarNavItem: React.ForwardRefExoticComponent<SidebarNavItemProps & React.RefAttributes<HTMLElement>>;
764
+ declare const SettingsNavItem: React.ForwardRefExoticComponent<SidebarNavItemProps & React.RefAttributes<HTMLElement>>;
765
+
637
766
  interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "max" | "min" | "onChange" | "size" | "step" | "type" | "value"> {
638
767
  defaultValue?: number;
639
768
  formatValue?: (value: number) => React.ReactNode;
@@ -665,6 +794,33 @@ type NotificationVariant = (typeof notificationVariantOptions)[number];
665
794
  type ToasterProps = ToasterProps$1;
666
795
 
667
796
  declare const Toaster: React.ForwardRefExoticComponent<ToasterProps$1 & React.RefAttributes<HTMLElement>>;
797
+ type NotifyOptions = ExternalToast & {
798
+ /** Stable key used for deduplication when no `id` is provided. */
799
+ key?: string;
800
+ };
801
+ type ToastMessage = React.ReactNode;
802
+ interface NotifyApi {
803
+ (message: ToastMessage, options?: NotifyOptions): ReturnType<typeof toast>;
804
+ success: (message: ToastMessage, options?: NotifyOptions) => ReturnType<typeof toast.success>;
805
+ error: (message: ToastMessage, options?: NotifyOptions) => ReturnType<typeof toast.error>;
806
+ warning: (message: ToastMessage, options?: NotifyOptions) => ReturnType<typeof toast.warning>;
807
+ info: (message: ToastMessage, options?: NotifyOptions) => ReturnType<typeof toast.info>;
808
+ message: (message: ToastMessage, options?: NotifyOptions) => ReturnType<typeof toast.message>;
809
+ loading: (message: ToastMessage, options?: NotifyOptions) => ReturnType<typeof toast.loading>;
810
+ dismiss: typeof toast.dismiss;
811
+ promise: typeof toast.promise;
812
+ }
813
+ /**
814
+ * Official, deduplicated notification API.
815
+ *
816
+ * Prefer `notify` over the raw `toast` export: every method here collapses
817
+ * repeated notifications about the same problem into a single toast (dedup by
818
+ * `id` → `key` → stable message hash), so calling `notify.error("Falha ao
819
+ * salvar")` twice updates the existing toast instead of stacking duplicates.
820
+ * The raw `toast` remains exported for advanced/custom cases that opt out of
821
+ * deduplication on purpose.
822
+ */
823
+ declare const notify: NotifyApi;
668
824
 
669
825
  declare const spinnerSizeOptions: readonly ["sm", "default", "lg"];
670
826
  type SpinnerSize = (typeof spinnerSizeOptions)[number];
@@ -673,6 +829,78 @@ interface SpinnerProps extends Omit<React.ComponentPropsWithoutRef<"svg">, "chil
673
829
  }
674
830
  declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<SVGSVGElement>>;
675
831
 
832
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
833
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
834
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
835
+ declare const tooltipToneOptions: readonly ["default", "info", "success", "warning", "destructive"];
836
+ type TooltipTone = (typeof tooltipToneOptions)[number];
837
+ interface TooltipContentProps extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {
838
+ tone?: TooltipTone;
839
+ }
840
+ declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLDivElement>>;
841
+ interface StatusTooltipProps {
842
+ /** Trigger element the status tooltip is anchored to. */
843
+ children: React.ReactNode;
844
+ /** Status label shown in its semantic color. */
845
+ label: React.ReactNode;
846
+ /** Semantic status driving the tooltip color. */
847
+ status?: TooltipTone;
848
+ /** Which side of the trigger the tooltip renders on. Defaults to `right`. */
849
+ side?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>["side"];
850
+ align?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>["align"];
851
+ sideOffset?: number;
852
+ /** Whether the status tooltip is interactive/disabled. */
853
+ disabled?: boolean;
854
+ open?: boolean;
855
+ defaultOpen?: boolean;
856
+ onOpenChange?: (open: boolean) => void;
857
+ delayDuration?: number;
858
+ className?: string;
859
+ }
860
+ /**
861
+ * StatusTooltip is a composite that anchors a tooltip to the right of its
862
+ * trigger (e.g. the right side of an encounter row in the Home sidebar) and
863
+ * renders the status label using the matching semantic color.
864
+ *
865
+ * It self-contains a `TooltipProvider` so it can be dropped in without extra
866
+ * wiring, and falls back gracefully when `disabled` is set.
867
+ */
868
+ declare const StatusTooltip: React.ForwardRefExoticComponent<StatusTooltipProps & React.RefAttributes<HTMLDivElement>>;
869
+
870
+ declare const workflowStatusOptions: readonly ["draft", "in_progress", "completed", "cancelled", "error", "warning"];
871
+ type WorkflowStatus = (typeof workflowStatusOptions)[number];
872
+ interface WorkflowStatusDescriptor {
873
+ /** Canonical status, or `null` when the input could not be resolved. */
874
+ status: WorkflowStatus | null;
875
+ tone: TooltipTone;
876
+ label: string;
877
+ }
878
+ /**
879
+ * Maps a workflow/document status (canonical key or common alias) to a tone and
880
+ * label. Unknown statuses fall back to the neutral tone with a humanized label
881
+ * (or an explicit `label` override), so consumers never crash on new statuses.
882
+ */
883
+ declare function resolveWorkflowStatus(status: WorkflowStatus | string, options?: {
884
+ label?: string;
885
+ }): WorkflowStatusDescriptor;
886
+ interface StatusIndicatorProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
887
+ status: WorkflowStatus | string;
888
+ /** Override the resolved label. */
889
+ label?: string;
890
+ /** Render the label text next to the dot. */
891
+ showLabel?: boolean;
892
+ /** Wrap in a status tooltip (anchored to the right by default). */
893
+ tooltip?: boolean;
894
+ side?: "top" | "right" | "bottom" | "left";
895
+ }
896
+ /**
897
+ * Semantic workflow/document status indicator: a tone-colored dot with an
898
+ * accessible label, and an optional status tooltip (anchored right, the default
899
+ * for list/table rows). The status text is always exposed to assistive tech via
900
+ * `aria-label`, independent of the visual tooltip.
901
+ */
902
+ declare const StatusIndicator: React.ForwardRefExoticComponent<StatusIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
903
+
676
904
  declare const switchSizeOptions: readonly ["default", "sm"];
677
905
  type SwitchSize = (typeof switchSizeOptions)[number];
678
906
  interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
@@ -685,40 +913,130 @@ interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimit
685
913
  }
686
914
  declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
687
915
 
916
+ declare const tableDensityOptions: readonly ["default", "compact"];
688
917
  declare const tableCellVariantOptions: readonly ["default", "primary", "muted"];
689
918
  declare const tableStatusToneOptions: readonly ["active", "inactive", "info", "warning"];
690
919
  declare const tableActionToneOptions: readonly ["primary", "neutral", "danger"];
920
+ type TableDensity = (typeof tableDensityOptions)[number];
921
+ type TableTextSize = "default" | "compact";
691
922
  declare const tableCellVariants: (props?: ({
923
+ density?: "default" | "compact" | null | undefined;
692
924
  variant?: "default" | "primary" | "muted" | null | undefined;
693
925
  } & class_variance_authority_types.ClassProp) | undefined) => string;
694
926
  declare const tableStatusBadgeVariants: (props?: ({
927
+ density?: "default" | "compact" | null | undefined;
695
928
  tone?: "warning" | "active" | "inactive" | "info" | null | undefined;
696
929
  } & class_variance_authority_types.ClassProp) | undefined) => string;
697
930
  declare const tableActionButtonVariants: (props?: ({
698
931
  tone?: "primary" | "neutral" | "danger" | null | undefined;
699
932
  } & class_variance_authority_types.ClassProp) | undefined) => string;
700
- declare const Table: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
701
- declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
933
+ interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
934
+ density?: TableDensity;
935
+ }
936
+ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
937
+ interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {
938
+ density?: TableDensity;
939
+ }
940
+ declare const TableHeader: React.ForwardRefExoticComponent<TableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
702
941
  declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
703
942
  declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
704
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
943
+ interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
944
+ density?: TableDensity;
945
+ }
946
+ declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
705
947
  declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
706
- interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement>, VariantProps<typeof tableCellVariants> {
948
+ interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement>, Omit<VariantProps<typeof tableCellVariants>, "density"> {
949
+ density?: TableDensity;
707
950
  /** When true, truncates overflowing text with an ellipsis. */
708
951
  truncate?: boolean;
709
952
  }
710
953
  declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
711
954
  declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
712
- declare const TableCellTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
713
- declare const TableCellDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
714
- interface TableStatusBadgeProps extends Omit<React.ComponentPropsWithoutRef<typeof Badge>, "variant" | "pillTone">, VariantProps<typeof tableStatusBadgeVariants> {
955
+ interface TableCellTitleProps extends React.HTMLAttributes<HTMLSpanElement> {
956
+ size?: TableTextSize;
957
+ }
958
+ declare const TableCellTitle: React.ForwardRefExoticComponent<TableCellTitleProps & React.RefAttributes<HTMLSpanElement>>;
959
+ interface TableCellDescriptionProps extends React.HTMLAttributes<HTMLSpanElement> {
960
+ size?: TableTextSize;
961
+ }
962
+ declare const TableCellDescription: React.ForwardRefExoticComponent<TableCellDescriptionProps & React.RefAttributes<HTMLSpanElement>>;
963
+ interface TableStatusBadgeProps extends Omit<React.ComponentPropsWithoutRef<typeof Badge>, "variant" | "pillTone">, Omit<VariantProps<typeof tableStatusBadgeVariants>, "density"> {
964
+ density?: TableDensity;
715
965
  }
716
- declare function TableStatusBadge({ className, tone, children, ...props }: TableStatusBadgeProps): react_jsx_runtime.JSX.Element;
966
+ declare function TableStatusBadge({ className, density, tone, children, ...props }: TableStatusBadgeProps): react_jsx_runtime.JSX.Element;
717
967
  interface TableActionButtonProps extends Omit<React.ComponentPropsWithoutRef<typeof Button>, "size" | "variant">, VariantProps<typeof tableActionButtonVariants> {
718
968
  }
719
969
  declare const TableActionButton: React.ForwardRefExoticComponent<TableActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
720
970
  declare const TableActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
721
971
 
972
+ declare const tagVariantOptions: readonly ["neutral", "organization", "privacy", "status"];
973
+ declare const tagStatusToneOptions: readonly ["info", "success", "warning", "destructive"];
974
+ type TagVariant = (typeof tagVariantOptions)[number];
975
+ type TagStatusTone = (typeof tagStatusToneOptions)[number];
976
+ declare const tagVariants: (props?: ({
977
+ variant?: "status" | "organization" | "neutral" | "privacy" | null | undefined;
978
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
979
+ interface TagProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof tagVariants> {
980
+ /** Status color when `variant="status"`. */
981
+ tone?: TagStatusTone;
982
+ icon?: React.ReactNode;
983
+ /**
984
+ * Truncate the label. Off by default so short/important labels (e.g.
985
+ * "Minha organização") are never clipped when there is room — only enable
986
+ * this together with a constraining width when the container is tight.
987
+ */
988
+ truncate?: boolean;
989
+ }
990
+ /**
991
+ * Compact semantic label. Variants: `neutral`, `organization`, `privacy` and
992
+ * `status` (with a `tone`). Text is not truncated by default.
993
+ */
994
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
995
+ declare const privacyLevelOptions: readonly ["private", "organization", "public"];
996
+ type PrivacyLevel = (typeof privacyLevelOptions)[number];
997
+ interface PrivacyLabelProps extends React.HTMLAttributes<HTMLSpanElement> {
998
+ privacy: PrivacyLevel;
999
+ /**
1000
+ * `text` (default) renders simple inline text — for specs that ask for plain
1001
+ * text rather than a tag. `tag` renders the chip treatment.
1002
+ */
1003
+ appearance?: "text" | "tag";
1004
+ label?: React.ReactNode;
1005
+ icon?: React.ReactNode;
1006
+ }
1007
+ /**
1008
+ * Privacy indicator. Defaults to plain text so it never looks like a tag unless
1009
+ * the spec calls for the chip (`appearance="tag"`).
1010
+ */
1011
+ declare const PrivacyLabel: React.ForwardRefExoticComponent<PrivacyLabelProps & React.RefAttributes<HTMLSpanElement>>;
1012
+
1013
+ declare const templateCardLayoutOptions: readonly ["card", "list"];
1014
+ type TemplateCardLayout = (typeof templateCardLayoutOptions)[number];
1015
+ interface TemplateCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
1016
+ title: React.ReactNode;
1017
+ description?: React.ReactNode;
1018
+ /** Secondary metadata row (tags, author, updated-at…). */
1019
+ meta?: React.ReactNode;
1020
+ layout?: TemplateCardLayout;
1021
+ selected?: boolean;
1022
+ favorited?: boolean;
1023
+ onToggleFavorite?: () => void;
1024
+ favoriteLabel?: string;
1025
+ /** Overflow menu trigger (e.g. a Dropdown). Rendered next to favorite. */
1026
+ overflow?: React.ReactNode;
1027
+ }
1028
+ /**
1029
+ * Template card / list item.
1030
+ *
1031
+ * - Title uses a semibold typography treatment.
1032
+ * - In the list layout the description uses a smaller type ramp.
1033
+ * - The favorite and overflow actions sit in a tight, tokenized cluster so they
1034
+ * never drift apart, and the action column is `shrink-0` so long titles wrap
1035
+ * instead of colliding with the actions.
1036
+ */
1037
+ declare const TemplateCard: React.ForwardRefExoticComponent<TemplateCardProps & React.RefAttributes<HTMLDivElement>>;
1038
+ declare const TemplateListItem: React.ForwardRefExoticComponent<Omit<TemplateCardProps, "layout"> & React.RefAttributes<HTMLDivElement>>;
1039
+
722
1040
  interface TabsItem {
723
1041
  value: string;
724
1042
  label: React.ReactNode;
@@ -753,9 +1071,11 @@ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.Re
753
1071
  type TextSize = SofyaTextStyleName;
754
1072
  type TextWeight = React.CSSProperties["fontWeight"];
755
1073
  type TextVariant = "default" | "gradient" | "shiny" | "split";
1074
+ type TextTone = "default" | "soft" | "subtle";
756
1075
  type TextSplitType = "chars" | "words" | "words, chars";
757
1076
  declare const textSizeOptions: readonly ["display-xl", "display-lg", "heading-xl", "heading-lg", "heading-md", "h1", "h2", "h3", "h4", "h5", "encounter-title", "title-md", "title-sm", "body-lg", "body-md", "body-sm", "body", "label-md", "section-label", "eyebrow-md", "overline-md", "sidebar-title", "sidebar-title-regular", "sidebar-title-strong", "sidebar-label", "sidebar-label-strong", "sidebar-body", "sidebar-tag", "encounter-chip", "encounter-history", "caption", "eyebrow", "tiny", "extra-tiny", "code-sm"];
758
1077
  declare const textVariantOptions: readonly ["default", "gradient", "shiny", "split"];
1078
+ declare const textToneOptions: readonly ["default", "soft", "subtle"];
759
1079
  declare const textSplitTypeOptions: readonly ["chars", "words", "words, chars"];
760
1080
  interface TextProps extends React.HTMLAttributes<HTMLElement> {
761
1081
  as?: React.ElementType;
@@ -765,13 +1085,14 @@ interface TextProps extends React.HTMLAttributes<HTMLElement> {
765
1085
  splitRootMargin?: string;
766
1086
  splitThreshold?: number;
767
1087
  splitType?: TextSplitType;
1088
+ tone?: TextTone;
768
1089
  variant?: TextVariant;
769
1090
  weight?: TextWeight;
770
1091
  }
771
1092
  declare function isTextContent(children: React.ReactNode): children is string | number;
772
- type RenderTextContentOptions = Pick<TextProps, "as" | "className" | "size" | "style" | "variant" | "weight">;
1093
+ type RenderTextContentOptions = Pick<TextProps, "as" | "className" | "size" | "style" | "tone" | "variant" | "weight">;
773
1094
  declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
774
- declare function renderTextContent(children: React.ReactNode, { as, className, size, style, variant, weight }?: RenderTextContentOptions): bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
1095
+ declare function renderTextContent(children: React.ReactNode, { as, className, size, style, tone, variant, weight }?: RenderTextContentOptions): bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
775
1096
 
776
1097
  interface ToggleProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
777
1098
  containerClassName?: string;
@@ -782,15 +1103,10 @@ interface ToggleProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimit
782
1103
  }
783
1104
  declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLButtonElement>>;
784
1105
 
785
- declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
786
- declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
787
- declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
788
- declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
789
-
790
1106
  interface SofyaProviderProps extends React.HTMLAttributes<HTMLDivElement> {
791
1107
  preset?: ThemePresetName | SofyaTheme;
792
1108
  overrides?: DeepPartial<SofyaTheme>;
793
1109
  }
794
1110
  declare function SofyaProvider({ preset, overrides, className, style, children, ...props }: SofyaProviderProps): react_jsx_runtime.JSX.Element;
795
1111
 
796
- export { Accordion, type AccordionAppearance, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertProps, type AlertSize, AlertTitle, type AlertTone, Avatar, type AvatarProps, Badge, type BadgeAlert, type BadgePillTone, type BadgeProps, type BadgeVariant, Button, type ButtonLanguageLocale, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, Cluster, type ClusterProps, Container, type ContainerProps, Dialog, DialogBody, DialogCancel, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DocumentCard, type DocumentCardProps, Dropdown, type DropdownAppearance, type DropdownItem, type DropdownProps, DropdownSearch, type DropdownSearchOption, type DropdownSearchProps, type DropdownSubItem, type DropdownTriggerSize, type DropdownVariant, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyProps, EmptyTitle, Icon, type IconColor, type IconName, type IconProps, type IconSize, Inline, type InlineProps, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant, Label, Link, type LinkProps, Logo, type LogoProps, type LogoSize, type LogoVariant, type NotificationVariant, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, Progress, type ProgressProps, type ProgressSize, ProseDialogBody, ProseDialogContent, type ProseDialogContentProps, ProseDialogDescription, ProseDialogHeader, ProseDialogTitle, RadioGroup, RadioGroupItem, type RadioGroupItemProps, RadioGroupOption, RadioGroupOptionAvatar, type RadioGroupOptionAvatarProps, RadioGroupOptionDescription, type RadioGroupOptionDescriptionProps, RadioGroupOptionIndicator, type RadioGroupOptionIndicatorProps, RadioGroupOptionLabel, type RadioGroupOptionLabelProps, type RadioGroupOptionProps, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupVariant, RightRailAction, type RightRailActionProps, ScrollArea, ScrollAreaCorner, type ScrollAreaOrientation, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, type SelectSize, SelectTrigger, SelectValue, Separator, Skeleton, type SkeletonProps, Slider, type SliderProps, SofyaProvider, type SofyaProviderProps, Spinner, type SpinnerProps, type SpinnerSize, Stack, type StackProps, Surface, type SurfaceVariant, Switch, type SwitchProps, type SwitchSize, Table, TableActionButton, type TableActionButtonProps, TableActions, TableBody, TableCaption, TableCell, TableCellDescription, type TableCellProps, TableCellTitle, TableFooter, TableHead, TableHeader, TableRow, TableStatusBadge, type TableStatusBadgeProps, Tabs, type TabsItem, type TabsProps, Text, type TextProps, type TextSize, type TextSplitType, type TextVariant, type TextWeight, Textarea, type TextareaProps, Toaster, type ToasterProps, Toggle, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadKind, accordionAppearanceOptions, alertSizeOptions, alertToneOptions, avatarSizeOptions, avatarVariants, badgeAlertOptions, badgeAlertVariants, badgePillToneOptions, badgePillVariants, badgeVariantOptions, badgeVariants, buttonLanguageLocaleOptions, buttonSizeOptions, buttonVariantOptions, buttonVariants, cardVariants, dropdownAppearanceOptions, dropdownLanguageItems, dropdownTriggerSizeOptions, dropdownVariantOptions, emptyMediaVariantOptions, iconColorOptions, iconNames, iconSizeMap, iconSizeOptions, inputVariantOptions, isTextContent, logoSizeOptions, logoVariants, notificationVariantOptions, paginationLinkVariants, progressSizeOptions, radioGroupOrientationOptions, radioGroupVariantOptions, renderTextContent, scrollAreaOrientationOptions, selectSizeOptions, spinnerSizeOptions, surfaceVariantOptions, switchSizeOptions, tableActionToneOptions, tableCellVariantOptions, tableStatusToneOptions, textSizeOptions, textSplitTypeOptions, textVariantOptions, uploadKindOptions };
1112
+ export { Accordion, type AccordionAppearance, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertProps, type AlertSize, AlertTitle, type AlertTone, Avatar, type AvatarProps, Badge, type BadgeAlert, type BadgePillTone, type BadgeProps, type BadgeVariant, Button, type ButtonLanguageLocale, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, CloseButton, type CloseButtonProps, Cluster, type ClusterProps, Container, type ContainerProps, Dialog, DialogBody, DialogCancel, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DocumentCard, type DocumentCardProps, Dropdown, type DropdownAppearance, type DropdownItem, type DropdownProps, DropdownSearch, type DropdownSearchOption, type DropdownSearchProps, type DropdownSubItem, type DropdownTriggerSize, type DropdownVariant, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyProps, EmptyTitle, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconColor, type IconName, type IconProps, type IconSize, Inline, type InlineProps, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant, Label, Link, type LinkProps, Logo, type LogoProps, type LogoSize, type LogoVariant, type NotificationVariant, type NotifyOptions, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverClose, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverPortal, PopoverTitle, PopoverTrigger, PrivacyLabel, type PrivacyLabelProps, type PrivacyLevel, Progress, type ProgressProps, type ProgressSize, ProseDialogBody, ProseDialogContent, type ProseDialogContentProps, ProseDialogDescription, ProseDialogHeader, ProseDialogTitle, RadioGroup, RadioGroupItem, type RadioGroupItemProps, RadioGroupOption, RadioGroupOptionAvatar, type RadioGroupOptionAvatarProps, RadioGroupOptionDescription, type RadioGroupOptionDescriptionProps, RadioGroupOptionIndicator, type RadioGroupOptionIndicatorProps, RadioGroupOptionLabel, type RadioGroupOptionLabelProps, type RadioGroupOptionProps, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupVariant, RichTextToolbar, RichTextToolbarButton, type RichTextToolbarButtonProps, RichTextToolbarGroup, type RichTextToolbarProps, RichTextToolbarSeparator, RightRailAction, type RightRailActionProps, ScrollArea, ScrollAreaCorner, type ScrollAreaOrientation, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaViewport, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, type SelectSize, SelectTrigger, SelectValue, Separator, SettingsNavItem, SidebarNavItem, type SidebarNavItemProps, Skeleton, type SkeletonProps, Slider, type SliderProps, SofyaProvider, type SofyaProviderProps, Spinner, type SpinnerProps, type SpinnerSize, Stack, type StackProps, StatusIndicator, type StatusIndicatorProps, StatusTooltip, type StatusTooltipProps, Surface, type SurfaceVariant, Switch, type SwitchProps, type SwitchSize, Table, TableActionButton, type TableActionButtonProps, TableActions, TableBody, TableCaption, TableCell, TableCellDescription, type TableCellDescriptionProps, type TableCellProps, TableCellTitle, type TableCellTitleProps, type TableDensity, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, TableStatusBadge, type TableStatusBadgeProps, type TableTextSize, Tabs, type TabsItem, type TabsProps, Tag, type TagProps, type TagStatusTone, type TagVariant, TemplateCard, type TemplateCardLayout, type TemplateCardProps, TemplateListItem, Text, type TextProps, type TextSize, type TextSplitType, type TextTone, type TextVariant, type TextWeight, Textarea, type TextareaProps, Toaster, type ToasterProps, Toggle, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, type TooltipTone, TooltipTrigger, type UploadKind, type WorkflowStatus, type WorkflowStatusDescriptor, accordionAppearanceOptions, alertSizeOptions, alertToneOptions, avatarSizeOptions, avatarVariants, badgeAlertOptions, badgeAlertVariants, badgePillToneOptions, badgePillVariants, badgeVariantOptions, badgeVariants, buttonLanguageLocaleOptions, buttonSizeOptions, buttonVariantOptions, buttonVariants, cardVariants, dropdownAppearanceOptions, dropdownLanguageItems, dropdownTriggerSizeOptions, dropdownVariantOptions, emptyMediaVariantOptions, iconButtonSizeOptions, iconButtonVariantOptions, iconColorOptions, iconNames, iconSizeMap, iconSizeOptions, inputVariantOptions, isTextContent, logoSizeOptions, logoVariants, notificationVariantOptions, notify, paginationLinkVariants, privacyLevelOptions, progressSizeOptions, radioGroupOrientationOptions, radioGroupVariantOptions, renderTextContent, resolveWorkflowStatus, scrollAreaOrientationOptions, selectSizeOptions, spinnerSizeOptions, surfaceVariantOptions, switchSizeOptions, tableActionToneOptions, tableCellVariantOptions, tableDensityOptions, tableStatusToneOptions, tagStatusToneOptions, tagVariantOptions, templateCardLayoutOptions, textSizeOptions, textSplitTypeOptions, textToneOptions, textVariantOptions, tooltipToneOptions, uploadKindOptions, workflowStatusOptions };