@salemcobalt/ui 0.1.1 → 0.2.0-rc.1

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,7 +1,13 @@
1
1
  import * as react from 'react';
2
- import { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import { ComponentPropsWithRef, ReactNode, ReactElement } from 'react';
3
3
  import { useRender } from '@base-ui/react/use-render';
4
4
  import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
5
+ import * as _base_ui_react from '@base-ui/react';
6
+ import { Menu as Menu$1 } from '@base-ui/react/menu';
7
+ import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
8
+ import { Switch as Switch$1 } from '@base-ui/react/switch';
9
+ import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
10
+ import { Toolbar as Toolbar$1 } from '@base-ui/react/toolbar';
5
11
 
6
12
  type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
7
13
  type ButtonSize = 'sm' | 'md' | 'lg';
@@ -61,7 +67,7 @@ type SpacingSize = 'none' | '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '
61
67
 
62
68
  type StackAlign = 'stretch' | 'start' | 'center' | 'end';
63
69
  type StackJustify = 'start' | 'center' | 'end' | 'between';
64
- type StackElement = 'div' | 'section' | 'ul' | 'ol' | 'nav' | 'form';
70
+ type StackElement = 'div' | 'section' | 'article' | 'ul' | 'ol' | 'li' | 'nav' | 'form' | 'fieldset' | 'header' | 'footer' | 'main' | 'aside' | 'dl';
65
71
  interface StackProps extends ComponentPropsWithRef<'div'> {
66
72
  /** Gap from the spacing scale. Default `sm` (12px). */
67
73
  gap?: SpacingSize | undefined;
@@ -69,7 +75,7 @@ interface StackProps extends ComponentPropsWithRef<'div'> {
69
75
  align?: StackAlign | undefined;
70
76
  /** Main-axis distribution. Default `start`. */
71
77
  justify?: StackJustify | undefined;
72
- /** Element to render. Use `ul`/`ol` for lists so semantics survive the layout. */
78
+ /** Element to render. Use `ul`/`ol` for lists and `li` for an item that stacks its own content, so semantics survive the layout. */
73
79
  as?: StackElement | undefined;
74
80
  /** Lays out as `inline-flex`. */
75
81
  inline?: boolean | undefined;
@@ -367,7 +373,7 @@ declare function Stack({ gap, align, justify, as, inline, className, ...rest }:
367
373
 
368
374
  type InlineAlign = 'center' | 'start' | 'end' | 'baseline' | 'stretch';
369
375
  type InlineJustify = 'start' | 'center' | 'end' | 'between';
370
- type InlineElement = 'div' | 'span' | 'ul' | 'nav';
376
+ type InlineElement = 'div' | 'span' | 'ul' | 'ol' | 'li' | 'nav' | 'header' | 'footer' | 'p' | 'label' | 'dd';
371
377
  interface InlineProps extends ComponentPropsWithRef<'div'> {
372
378
  /** Gap from the spacing scale. Default `xs` (8px). */
373
379
  gap?: SpacingSize | undefined;
@@ -377,7 +383,7 @@ interface InlineProps extends ComponentPropsWithRef<'div'> {
377
383
  justify?: InlineJustify | undefined;
378
384
  /** Wraps by default; `false` for toolbars that scroll. */
379
385
  wrap?: boolean | undefined;
380
- /** Element to render. */
386
+ /** Element to render. Use `ul`/`ol` for a row of items and `li` for an item laid out as a row. */
381
387
  as?: InlineElement | undefined;
382
388
  children?: ReactNode | undefined;
383
389
  }
@@ -700,14 +706,14 @@ interface DialogRootProps {
700
706
  children?: ReactNode | undefined;
701
707
  }
702
708
  /** Owns the open state. Wrap a `Dialog.Trigger` and a `Dialog.Content`. */
703
- declare function Root({ dismissible, onOpenChange, open, defaultOpen, children }: DialogRootProps): react.JSX.Element;
709
+ declare function Root$3({ dismissible, onOpenChange, open, defaultOpen, children }: DialogRootProps): react.JSX.Element;
704
710
  interface DialogContentProps extends Omit<Dialog$1.Popup.Props, 'className'> {
705
711
  /** `sm` 400px for yes/no, `md` 560px (default) for a short form, `lg` 720px rarely. */
706
712
  size?: DialogSize | undefined;
707
713
  className?: string | undefined;
708
714
  }
709
715
  /** Portal, backdrop and the popup. Focus moves inside on open and returns to the trigger on close. */
710
- declare function Content({ size, className, children, ...rest }: DialogContentProps): react.JSX.Element;
716
+ declare function Content$1({ size, className, children, ...rest }: DialogContentProps): react.JSX.Element;
711
717
  interface DialogTitleProps extends Omit<Dialog$1.Title.Props, 'className'> {
712
718
  className?: string | undefined;
713
719
  }
@@ -731,9 +737,9 @@ interface DialogCloseProps extends Omit<Dialog$1.Close.Props, 'className'> {
731
737
  declare function Close({ className, children, render, ...rest }: DialogCloseProps): react.JSX.Element;
732
738
  /** A modal that interrupts for a decision or a short form. Built on Base UI's Dialog. */
733
739
  declare const Dialog: {
734
- Root: typeof Root;
740
+ Root: typeof Root$3;
735
741
  Trigger: Dialog$1.Trigger;
736
- Content: typeof Content;
742
+ Content: typeof Content$1;
737
743
  Title: typeof Title;
738
744
  Description: typeof Description;
739
745
  Body: typeof Body;
@@ -741,7 +747,871 @@ declare const Dialog: {
741
747
  Close: typeof Close;
742
748
  };
743
749
 
750
+ type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'em';
751
+ interface IconProps extends Omit<ComponentPropsWithRef<'svg'>, 'children'> {
752
+ /** `xs` 12, `sm` 14, `md` 16 (default), `lg` 20, `xl` 24, or `em` to follow the surrounding font size. */
753
+ size?: IconSize | undefined;
754
+ /** Gives the icon an accessible name (`role="img"`). Without it the icon is decorative and hidden from assistive tech. */
755
+ title?: string | undefined;
756
+ /** The glyph: `<path>`, `<circle>` … on a 16×16 grid, stroke `currentColor`. */
757
+ children: ReactNode;
758
+ }
759
+ /** Props of a shipped icon such as `PlayIcon`: everything `Icon` takes except the glyph. */
760
+ type IconGlyphProps = Omit<IconProps, 'children'>;
761
+ /**
762
+ * The frame every icon renders in: a 16×16 outline in `currentColor`, sized by `size`, decorative unless
763
+ * `title` is given. Use the shipped `<Name>Icon` components, or wrap your own paths.
764
+ */
765
+ declare function Icon({ size, title, className, children, ...rest }: IconProps): react.JSX.Element;
766
+
767
+ /** `archive` */
768
+ declare function ArchiveIcon(props: IconGlyphProps): react.JSX.Element;
769
+ /** `arrow-left` */
770
+ declare function ArrowLeftIcon(props: IconGlyphProps): react.JSX.Element;
771
+ /** `arrow-right` */
772
+ declare function ArrowRightIcon(props: IconGlyphProps): react.JSX.Element;
773
+ /** `bell` */
774
+ declare function BellIcon(props: IconGlyphProps): react.JSX.Element;
775
+ /** `briefcase` */
776
+ declare function BriefcaseIcon(props: IconGlyphProps): react.JSX.Element;
777
+ /** `calendar` */
778
+ declare function CalendarIcon(props: IconGlyphProps): react.JSX.Element;
779
+ /** `check` */
780
+ declare function CheckIcon(props: IconGlyphProps): react.JSX.Element;
781
+ /** `chevron-down` */
782
+ declare function ChevronDownIcon(props: IconGlyphProps): react.JSX.Element;
783
+ /** `chevron-left` */
784
+ declare function ChevronLeftIcon(props: IconGlyphProps): react.JSX.Element;
785
+ /** `chevron-right` */
786
+ declare function ChevronRightIcon(props: IconGlyphProps): react.JSX.Element;
787
+ /** `chevron-up` */
788
+ declare function ChevronUpIcon(props: IconGlyphProps): react.JSX.Element;
789
+ /** `circle-check` */
790
+ declare function CircleCheckIcon(props: IconGlyphProps): react.JSX.Element;
791
+ /** `circle-x` */
792
+ declare function CircleXIcon(props: IconGlyphProps): react.JSX.Element;
793
+ /** `clock` */
794
+ declare function ClockIcon(props: IconGlyphProps): react.JSX.Element;
795
+ /** `copy` */
796
+ declare function CopyIcon(props: IconGlyphProps): react.JSX.Element;
797
+ /** `document` */
798
+ declare function DocumentIcon(props: IconGlyphProps): react.JSX.Element;
799
+ /** `download` */
800
+ declare function DownloadIcon(props: IconGlyphProps): react.JSX.Element;
801
+ /** `edit` */
802
+ declare function EditIcon(props: IconGlyphProps): react.JSX.Element;
803
+ /** `external-link` */
804
+ declare function ExternalLinkIcon(props: IconGlyphProps): react.JSX.Element;
805
+ /** `eye` */
806
+ declare function EyeIcon(props: IconGlyphProps): react.JSX.Element;
807
+ /** `filter` */
808
+ declare function FilterIcon(props: IconGlyphProps): react.JSX.Element;
809
+ /** `flag` */
810
+ declare function FlagIcon(props: IconGlyphProps): react.JSX.Element;
811
+ /** `inbox` */
812
+ declare function InboxIcon(props: IconGlyphProps): react.JSX.Element;
813
+ /** `info` */
814
+ declare function InfoIcon(props: IconGlyphProps): react.JSX.Element;
815
+ /** `link` */
816
+ declare function LinkIcon(props: IconGlyphProps): react.JSX.Element;
817
+ /** `mail` */
818
+ declare function MailIcon(props: IconGlyphProps): react.JSX.Element;
819
+ /** `map-pin` */
820
+ declare function MapPinIcon(props: IconGlyphProps): react.JSX.Element;
821
+ /** `menu` */
822
+ declare function MenuIcon(props: IconGlyphProps): react.JSX.Element;
823
+ /** `minus` */
824
+ declare function MinusIcon(props: IconGlyphProps): react.JSX.Element;
825
+ /** `moon` */
826
+ declare function MoonIcon(props: IconGlyphProps): react.JSX.Element;
827
+ /** `more-horizontal` */
828
+ declare function MoreHorizontalIcon(props: IconGlyphProps): react.JSX.Element;
829
+ /** `more-vertical` */
830
+ declare function MoreVerticalIcon(props: IconGlyphProps): react.JSX.Element;
831
+ /** `pause` */
832
+ declare function PauseIcon(props: IconGlyphProps): react.JSX.Element;
833
+ /** `play` */
834
+ declare function PlayIcon(props: IconGlyphProps): react.JSX.Element;
835
+ /** `plus` */
836
+ declare function PlusIcon(props: IconGlyphProps): react.JSX.Element;
837
+ /** `refresh` */
838
+ declare function RefreshIcon(props: IconGlyphProps): react.JSX.Element;
839
+ /** `search` */
840
+ declare function SearchIcon(props: IconGlyphProps): react.JSX.Element;
841
+ /** `settings` */
842
+ declare function SettingsIcon(props: IconGlyphProps): react.JSX.Element;
843
+ /** `star` */
844
+ declare function StarIcon(props: IconGlyphProps): react.JSX.Element;
845
+ /** `sun` */
846
+ declare function SunIcon(props: IconGlyphProps): react.JSX.Element;
847
+ /** `thumbs-down` */
848
+ declare function ThumbsDownIcon(props: IconGlyphProps): react.JSX.Element;
849
+ /** `thumbs-up` */
850
+ declare function ThumbsUpIcon(props: IconGlyphProps): react.JSX.Element;
851
+ /** `trash` */
852
+ declare function TrashIcon(props: IconGlyphProps): react.JSX.Element;
853
+ /** `undo` */
854
+ declare function UndoIcon(props: IconGlyphProps): react.JSX.Element;
855
+ /** `user` */
856
+ declare function UserIcon(props: IconGlyphProps): react.JSX.Element;
857
+ /** `warning` */
858
+ declare function WarningIcon(props: IconGlyphProps): react.JSX.Element;
859
+ /** `x` */
860
+ declare function XIcon(props: IconGlyphProps): react.JSX.Element;
861
+
862
+ /** Every icon shipped by this package, as `<Name>Icon` components. */
863
+ declare const iconNames: readonly ["archive", "arrow-left", "arrow-right", "bell", "briefcase", "calendar", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "circle-check", "circle-x", "clock", "copy", "document", "download", "edit", "external-link", "eye", "filter", "flag", "inbox", "info", "link", "mail", "map-pin", "menu", "minus", "moon", "more-horizontal", "more-vertical", "pause", "play", "plus", "refresh", "search", "settings", "star", "sun", "thumbs-down", "thumbs-up", "trash", "undo", "user", "warning", "x"];
864
+ type IconName = (typeof iconNames)[number];
865
+
866
+ type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
867
+ type TooltipAlign = 'start' | 'center' | 'end';
868
+ interface TooltipProps {
869
+ /** The hint. Short text; never anything the user cannot do without. */
870
+ content: ReactNode;
871
+ /** The trigger: one element that takes a ref and spreads props, such as `IconButton`, `Button` or `Badge`. */
872
+ children: ReactElement;
873
+ /** Which side of the trigger the hint opens on; flips when there is no room. Default `top`. */
874
+ side?: TooltipSide | undefined;
875
+ /** Alignment along that side. Default `center`. */
876
+ align?: TooltipAlign | undefined;
877
+ /** Hover delay in ms before opening. Default 300; inside `Tooltip.Provider` sibling tooltips open instantly once one is open. */
878
+ delay?: number | undefined;
879
+ /** Delay in ms before closing. Default 0. */
880
+ closeDelay?: number | undefined;
881
+ /** Controlled open state. */
882
+ open?: boolean | undefined;
883
+ /** Initial open state when uncontrolled. */
884
+ defaultOpen?: boolean | undefined;
885
+ /** Called when the hint opens or closes. */
886
+ onOpenChange?: ((open: boolean) => void) | undefined;
887
+ /** Never opens. */
888
+ disabled?: boolean | undefined;
889
+ className?: string | undefined;
890
+ }
891
+ /**
892
+ * A hint that opens on hover and keyboard focus. Supplementary only: touch devices never see it and
893
+ * screen readers hear the trigger's own name, so the trigger must already be labelled.
894
+ */
895
+ declare function TooltipBase({ content, children, side, align, delay, closeDelay, open, defaultOpen, onOpenChange, disabled, className, }: TooltipProps): react.JSX.Element;
896
+ declare const Tooltip: typeof TooltipBase & {
897
+ Provider: react.FC<_base_ui_react.TooltipProviderProps>;
898
+ };
899
+
900
+ interface IconButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children' | 'aria-label'> {
901
+ /** Required. The accessible name, and the tooltip text when `tooltip` is `true`. */
902
+ label: string;
903
+ /** The icon, usually a shipped `<Name>Icon`. It is decorative; `label` names the button. Optional only so a popup trigger can supply it through `render`. */
904
+ children?: ReactNode | undefined;
905
+ /** `ghost` (default) in toolbars and rows, `secondary` when it must read as a button, `primary` and `danger` rarely. */
906
+ variant?: ButtonVariant | undefined;
907
+ /** Square: 32, 40 or 48px. Compact density shrinks each by one step. */
908
+ size?: ButtonSize | undefined;
909
+ /** `true` shows `label` as a tooltip on hover and focus; a string shows that text instead. */
910
+ tooltip?: boolean | string | undefined;
911
+ /** Side the tooltip opens on. Default `top`. */
912
+ tooltipSide?: TooltipSide | undefined;
913
+ /** Fully round, for avatars and floating actions. */
914
+ round?: boolean | undefined;
915
+ /** Shows a spinner, sets `aria-busy` and ignores clicks. */
916
+ loading?: boolean | undefined;
917
+ }
918
+ /** A square Button for one icon. Always named by `label`; use `tooltip` to show that name on hover. */
919
+ declare function IconButton({ label, children, variant, size, tooltip, tooltipSide, round, loading, type, className, onClick, ...rest }: IconButtonProps): react.JSX.Element;
920
+
921
+ type MenuSide = 'top' | 'bottom' | 'left' | 'right';
922
+ type MenuAlign = 'start' | 'center' | 'end';
923
+ type MenuItemTone = 'default' | 'danger';
924
+ interface MenuRootProps {
925
+ /** Controlled open state. */
926
+ open?: boolean | undefined;
927
+ /** Initial open state when uncontrolled. */
928
+ defaultOpen?: boolean | undefined;
929
+ /** Called when the menu opens or closes. */
930
+ onOpenChange?: ((open: boolean) => void) | undefined;
931
+ /** Disables the trigger. */
932
+ disabled?: boolean | undefined;
933
+ /** Default `true`: the page behind the menu is inert until it closes. */
934
+ modal?: boolean | undefined;
935
+ children?: ReactNode | undefined;
936
+ }
937
+ /** Owns the open state. Wrap a `Menu.Trigger` and a `Menu.Content`. */
938
+ declare function Root$2({ open, defaultOpen, onOpenChange, disabled, modal, children }: MenuRootProps): react.JSX.Element;
939
+ interface MenuTriggerProps extends Omit<Menu$1.Trigger.Props, 'className'> {
940
+ className?: string | undefined;
941
+ }
942
+ /**
943
+ * Opens the menu. With no `render` it is a secondary Button with a chevron; pass any Button or
944
+ * IconButton through `render`: `<Menu.Trigger render={<IconButton label="More" />}><MoreHorizontalIcon /></Menu.Trigger>`.
945
+ */
946
+ declare function Trigger({ render, className, children, ...rest }: MenuTriggerProps): react.JSX.Element;
947
+ interface MenuContentProps extends Omit<Menu$1.Popup.Props, 'className'> {
948
+ /** Side of the trigger the menu opens on; flips when there is no room. Default `bottom`. */
949
+ side?: MenuSide | undefined;
950
+ /** Alignment along that side. Default `start`. */
951
+ align?: MenuAlign | undefined;
952
+ /** Distance from the trigger in px. Default 4. */
953
+ sideOffset?: number | undefined;
954
+ className?: string | undefined;
955
+ }
956
+ /** Portal, positioner and the popup. Items go inside. */
957
+ declare function Content({ side, align, sideOffset, className, children, ...rest }: MenuContentProps): react.JSX.Element;
958
+ interface ItemSlots {
959
+ /** A 16px icon before the label. */
960
+ icon?: ReactNode | undefined;
961
+ /** Muted text at the end: a shortcut (`<Kbd>`) or a count. */
962
+ trailing?: ReactNode | undefined;
963
+ /** `danger` for destructive actions; put them last, after a separator. */
964
+ tone?: MenuItemTone | undefined;
965
+ }
966
+ interface MenuItemProps extends Omit<Menu$1.Item.Props, 'className'>, ItemSlots {
967
+ className?: string | undefined;
968
+ }
969
+ /** One action. Closes the menu when activated. */
970
+ declare function Item({ icon, trailing, tone, className, children, ...rest }: MenuItemProps): react.JSX.Element;
971
+ interface MenuLinkItemProps extends Omit<Menu$1.LinkItem.Props, 'className'>, ItemSlots {
972
+ className?: string | undefined;
973
+ }
974
+ /** An item that navigates: renders an `<a href>`. */
975
+ declare function LinkItem({ icon, trailing, tone, className, children, ...rest }: MenuLinkItemProps): react.JSX.Element;
976
+ interface MenuCheckboxItemProps extends Omit<Menu$1.CheckboxItem.Props, 'className' | 'onCheckedChange'> {
977
+ /** Called with the next checked state. */
978
+ onCheckedChange?: ((checked: boolean) => void) | undefined;
979
+ /** Muted text at the end. */
980
+ trailing?: ReactNode | undefined;
981
+ className?: string | undefined;
982
+ }
983
+ /** A toggle. Stays open when activated so several can be flipped at once; pass `closeOnClick` to close. */
984
+ declare function CheckboxItem({ trailing, onCheckedChange, className, children, ...rest }: MenuCheckboxItemProps): react.JSX.Element;
985
+ interface MenuRadioGroupProps<Value extends string = string> extends Omit<Menu$1.RadioGroup.Props, 'className' | 'value' | 'defaultValue' | 'onValueChange'> {
986
+ /** Controlled selected value. */
987
+ value?: Value | undefined;
988
+ /** Initial value when uncontrolled. */
989
+ defaultValue?: Value | undefined;
990
+ /** Called with the next selected value. */
991
+ onValueChange?: ((value: Value) => void) | undefined;
992
+ /** A heading for the group, rendered above the items. */
993
+ label?: ReactNode | undefined;
994
+ className?: string | undefined;
995
+ }
996
+ /** A set of `Menu.RadioItem`s where exactly one is selected. */
997
+ declare function RadioGroup<Value extends string = string>({ label, onValueChange, className, children, ...rest }: MenuRadioGroupProps<Value>): react.JSX.Element;
998
+ interface MenuRadioItemProps extends Omit<Menu$1.RadioItem.Props, 'className' | 'value'> {
999
+ value: string;
1000
+ /** Muted text at the end. */
1001
+ trailing?: ReactNode | undefined;
1002
+ className?: string | undefined;
1003
+ }
1004
+ /** One choice in a `Menu.RadioGroup`. Stays open when chosen; pass `closeOnClick` to close. */
1005
+ declare function RadioItem({ trailing, className, children, ...rest }: MenuRadioItemProps): react.JSX.Element;
1006
+ interface MenuGroupProps extends Omit<Menu$1.Group.Props, 'className'> {
1007
+ /** A heading for the group, rendered above the items. */
1008
+ label?: ReactNode | undefined;
1009
+ className?: string | undefined;
1010
+ }
1011
+ /** Labels a run of items. */
1012
+ declare function Group$1({ label, className, children, ...rest }: MenuGroupProps): react.JSX.Element;
1013
+ interface MenuSeparatorProps extends Omit<Menu$1.Separator.Props, 'className'> {
1014
+ className?: string | undefined;
1015
+ }
1016
+ /** A hairline between runs of items. */
1017
+ declare function Separator$1({ className, ...rest }: MenuSeparatorProps): react.JSX.Element;
1018
+ /** A dropdown of actions on a trigger, with full keyboard support. Built on Base UI's Menu. */
1019
+ declare const Menu: {
1020
+ Root: typeof Root$2;
1021
+ Trigger: typeof Trigger;
1022
+ Content: typeof Content;
1023
+ Item: typeof Item;
1024
+ LinkItem: typeof LinkItem;
1025
+ CheckboxItem: typeof CheckboxItem;
1026
+ RadioGroup: typeof RadioGroup;
1027
+ RadioItem: typeof RadioItem;
1028
+ Group: typeof Group$1;
1029
+ Separator: typeof Separator$1;
1030
+ };
1031
+
1032
+ type ControlSize = 'sm' | 'md' | 'lg';
1033
+ /** Props shared by every labelled form control: Input, Textarea, Select. */
1034
+ interface FieldProps {
1035
+ /** Required. The visible label; use `hideLabel` to keep it for assistive tech only. */
1036
+ label: ReactNode;
1037
+ /** Visually hides the label (a search box with an icon, a table filter). */
1038
+ hideLabel?: boolean | undefined;
1039
+ /** Help text under the control, wired with `aria-describedby`. */
1040
+ description?: ReactNode | undefined;
1041
+ /** The error message. When given the control is invalid and the message is announced. */
1042
+ error?: ReactNode | undefined;
1043
+ /** Marks the control invalid without a message. */
1044
+ invalid?: boolean | undefined;
1045
+ /** Shows a mark after the label and sets the native `required`. */
1046
+ required?: boolean | undefined;
1047
+ disabled?: boolean | undefined;
1048
+ /** Identifies the value when a form is submitted. */
1049
+ name?: string | undefined;
1050
+ /** Control height: 32, 40 (default) or 48px. Compact density shrinks each by one step. */
1051
+ size?: ControlSize | undefined;
1052
+ /** Class on the wrapper, not the control. */
1053
+ className?: string | undefined;
1054
+ }
1055
+
1056
+ interface InputProps extends Omit<ComponentPropsWithRef<'input'>, 'size' | 'name' | 'disabled' | 'required' | 'className'>, FieldProps {
1057
+ /** A 16px icon inside the start edge, for search and URL fields. Decorative. */
1058
+ iconStart?: ReactNode | undefined;
1059
+ /** A 16px icon inside the end edge. Decorative; use an `IconButton` outside the field for an action. */
1060
+ iconEnd?: ReactNode | undefined;
1061
+ /** Called with the string value on every change, beside the native `onChange`. */
1062
+ onValueChange?: ((value: string) => void) | undefined;
1063
+ }
1064
+ /** A labelled single-line text field. Renders a native `<input>` inside Base UI's Field. */
1065
+ declare function Input({ label, hideLabel, description, error, invalid, required, disabled, name, size, className, iconStart, iconEnd, onValueChange, ...rest }: InputProps): react.JSX.Element;
1066
+
1067
+ interface TextareaProps extends Omit<ComponentPropsWithRef<'textarea'>, 'name' | 'disabled' | 'required' | 'className'>, Omit<FieldProps, 'size'> {
1068
+ /** Visible lines. Default 3. */
1069
+ rows?: number | undefined;
1070
+ /** `vertical` (default) lets the user drag it taller; `none` fixes the height. */
1071
+ resize?: 'vertical' | 'none' | undefined;
1072
+ /** Called with the string value on every change, beside the native `onChange`. */
1073
+ onValueChange?: ((value: string) => void) | undefined;
1074
+ }
1075
+ /** A labelled multi-line text field. Renders a native `<textarea>` inside Base UI's Field. */
1076
+ declare function Textarea({ label, hideLabel, description, error, invalid, required, disabled, name, className, rows, resize, onValueChange, ...rest }: TextareaProps): react.JSX.Element;
1077
+
1078
+ interface SelectOption<Value extends string = string> {
1079
+ value: Value;
1080
+ label: ReactNode;
1081
+ disabled?: boolean | undefined;
1082
+ }
1083
+ interface SelectGroup<Value extends string = string> {
1084
+ /** Heading shown above the group's options. */
1085
+ label: ReactNode;
1086
+ options: SelectOption<Value>[];
1087
+ }
1088
+ interface SelectProps<Value extends string = string> extends FieldProps {
1089
+ /** Flat options, or groups of options with a heading. */
1090
+ options: Array<SelectOption<Value> | SelectGroup<Value>>;
1091
+ /** Controlled value; `null` for none. */
1092
+ value?: Value | null | undefined;
1093
+ /** Initial value when uncontrolled. */
1094
+ defaultValue?: Value | null | undefined;
1095
+ /** Called with the chosen value. */
1096
+ onValueChange?: ((value: Value | null) => void) | undefined;
1097
+ /** Shown in the trigger while nothing is chosen. */
1098
+ placeholder?: ReactNode | undefined;
1099
+ /** Prevents choosing a different option. */
1100
+ readOnly?: boolean | undefined;
1101
+ /** Stretches the trigger to the container. */
1102
+ fullWidth?: boolean | undefined;
1103
+ id?: string | undefined;
1104
+ }
1105
+ /**
1106
+ * A labelled single-choice dropdown. Built on Base UI's Select so the list is styled and keyboard
1107
+ * complete; submits like a native select through `name`.
1108
+ */
1109
+ declare function Select<Value extends string = string>({ label, hideLabel, description, error, invalid, required, disabled, name, size, className, options, value, defaultValue, onValueChange, placeholder, readOnly, fullWidth, id, }: SelectProps<Value>): react.JSX.Element;
1110
+
1111
+ interface CheckboxProps extends Omit<Checkbox$1.Root.Props, 'className' | 'onCheckedChange' | 'render' | 'children'> {
1112
+ /** Required. The visible label; clicking it toggles the box. */
1113
+ label: ReactNode;
1114
+ /** Help text under the label, wired with `aria-describedby`. */
1115
+ description?: ReactNode | undefined;
1116
+ /** Called with the next checked state. */
1117
+ onCheckedChange?: ((checked: boolean) => void) | undefined;
1118
+ className?: string | undefined;
1119
+ }
1120
+ /** A labelled checkbox. `indeterminate` shows a dash for "some of these". Built on Base UI's Checkbox. */
1121
+ declare function Checkbox({ label, description, onCheckedChange, className, disabled, ...rest }: CheckboxProps): react.JSX.Element;
1122
+
1123
+ interface SwitchProps extends Omit<Switch$1.Root.Props, 'className' | 'onCheckedChange' | 'render' | 'children'> {
1124
+ /** Required. The visible label; clicking it flips the switch. */
1125
+ label: ReactNode;
1126
+ /** Help text under the label, wired with `aria-describedby`. */
1127
+ description?: ReactNode | undefined;
1128
+ /** Called with the next checked state. */
1129
+ onCheckedChange?: ((checked: boolean) => void) | undefined;
1130
+ /** `end` (default) puts the switch before the label; `start` puts the label first and the switch at the row's end. */
1131
+ labelPosition?: 'start' | 'end' | undefined;
1132
+ className?: string | undefined;
1133
+ }
1134
+ /** A labelled on/off switch for settings that apply at once. Built on Base UI's Switch. */
1135
+ declare function Switch({ label, description, onCheckedChange, labelPosition, className, disabled, ...rest }: SwitchProps): react.JSX.Element;
1136
+
1137
+ interface TabsRootProps extends Omit<Tabs$1.Root.Props, 'className' | 'value' | 'defaultValue' | 'onValueChange'> {
1138
+ /** Controlled active tab. */
1139
+ value?: string | undefined;
1140
+ /** Initial active tab when uncontrolled. Defaults to the first enabled tab. */
1141
+ defaultValue?: string | undefined;
1142
+ /** Called with the value of the newly active tab. */
1143
+ onValueChange?: ((value: string) => void) | undefined;
1144
+ className?: string | undefined;
1145
+ }
1146
+ /** Owns the active tab. Wrap a `Tabs.List` and one `Tabs.Panel` per tab. */
1147
+ declare function Root$1({ className, onValueChange, ...rest }: TabsRootProps): react.JSX.Element;
1148
+ interface TabsListProps extends Omit<Tabs$1.List.Props, 'className'> {
1149
+ /** Names the set of tabs for assistive tech: "Inbox sections". */
1150
+ 'aria-label': string;
1151
+ /** Tabs share the width equally instead of sizing to their labels. */
1152
+ fill?: boolean | undefined;
1153
+ className?: string | undefined;
1154
+ }
1155
+ /** The row of tabs with the sliding indicator. Arrow keys move between tabs; Enter or Space activates. */
1156
+ declare function List({ fill, className, children, ...rest }: TabsListProps): react.JSX.Element;
1157
+ interface TabsTabProps extends Omit<Tabs$1.Tab.Props, 'className' | 'value'> {
1158
+ value: string;
1159
+ /** A 16px icon before the label. */
1160
+ icon?: ReactNode | undefined;
1161
+ /** A count after the label, muted: `12`. */
1162
+ count?: ReactNode | undefined;
1163
+ className?: string | undefined;
1164
+ }
1165
+ /** One tab. */
1166
+ declare function Tab({ icon, count, className, children, ...rest }: TabsTabProps): react.JSX.Element;
1167
+ interface TabsPanelProps extends Omit<Tabs$1.Panel.Props, 'className' | 'value'> {
1168
+ value: string;
1169
+ className?: string | undefined;
1170
+ }
1171
+ /** The content of one tab. Unmounted while hidden unless `keepMounted`. */
1172
+ declare function Panel({ className, ...rest }: TabsPanelProps): react.JSX.Element;
1173
+ /** Switches between sections of one view. Built on Base UI's Tabs. */
1174
+ declare const Tabs: {
1175
+ Root: typeof Root$1;
1176
+ List: typeof List;
1177
+ Tab: typeof Tab;
1178
+ Panel: typeof Panel;
1179
+ };
1180
+
1181
+ interface ToolbarRootProps extends Omit<Toolbar$1.Root.Props, 'className'> {
1182
+ /** Required. Names the toolbar for assistive tech: "Inbox actions". */
1183
+ 'aria-label': string;
1184
+ /** Wraps onto new lines on narrow widths (default). `false` keeps one line that overflows. */
1185
+ wrap?: boolean | undefined;
1186
+ /** Gap between items and groups. Default `xs`. */
1187
+ gap?: SpacingSize | undefined;
1188
+ className?: string | undefined;
1189
+ }
1190
+ /**
1191
+ * A row of controls with one tab stop: Tab enters, arrow keys move between items, Tab leaves. Put every
1192
+ * control through `Toolbar.Button` (`render={<IconButton … />}`) so it joins the roving focus.
1193
+ */
1194
+ declare function Root({ wrap, gap, className, ...rest }: ToolbarRootProps): react.JSX.Element;
1195
+ interface ToolbarGroupProps extends Omit<Toolbar$1.Group.Props, 'className'> {
1196
+ /** Names the group: "Playback". */
1197
+ 'aria-label'?: string | undefined;
1198
+ /** Gap inside the group. Default `2xs`. */
1199
+ gap?: SpacingSize | undefined;
1200
+ className?: string | undefined;
1201
+ }
1202
+ /** Keeps related controls together with a tighter gap. */
1203
+ declare function Group({ gap, className, ...rest }: ToolbarGroupProps): react.JSX.Element;
1204
+ interface ToolbarSeparatorProps extends Omit<Toolbar$1.Separator.Props, 'className'> {
1205
+ className?: string | undefined;
1206
+ }
1207
+ /** A hairline between groups. */
1208
+ declare function Separator({ className, ...rest }: ToolbarSeparatorProps): react.JSX.Element;
1209
+ interface ToolbarButtonProps extends Omit<Toolbar$1.Button.Props, 'className'> {
1210
+ className?: string | undefined;
1211
+ }
1212
+ interface ToolbarSpacerProps {
1213
+ className?: string | undefined;
1214
+ }
1215
+ /** Pushes what follows to the far end. */
1216
+ declare function Spacer({ className }: ToolbarSpacerProps): react.JSX.Element;
1217
+ /** A horizontal container of controls. Built on Base UI's Toolbar. */
1218
+ declare const Toolbar: {
1219
+ Root: typeof Root;
1220
+ Group: typeof Group;
1221
+ Separator: typeof Separator;
1222
+ Button: react.ForwardRefExoticComponent<Omit<_base_ui_react.ToolbarButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
1223
+ Spacer: typeof Spacer;
1224
+ };
1225
+
1226
+ type BannerTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
1227
+ interface BannerProps extends ComponentPropsWithRef<'div'> {
1228
+ /** Colour and default icon. `warning` and `danger` are announced as alerts; the rest as status. */
1229
+ tone?: BannerTone | undefined;
1230
+ /** Replaces the tone's icon; `false` removes it. */
1231
+ icon?: ReactNode | false | undefined;
1232
+ /** One Button, usually `variant="ghost" size="sm"`, at the end of the strip. */
1233
+ action?: ReactNode | undefined;
1234
+ /** Shows a close button that hides the banner. */
1235
+ dismissible?: boolean | undefined;
1236
+ /** Called when the close button is pressed. */
1237
+ onDismiss?: (() => void) | undefined;
1238
+ /** Controlled visibility when dismissible. */
1239
+ open?: boolean | undefined;
1240
+ /** Accessible name of the close button. Default "Dismiss". */
1241
+ dismissLabel?: string | undefined;
1242
+ }
1243
+ /** A single-line status strip across the top of a view: paused, offline, "3 new since you looked". */
1244
+ declare function Banner({ tone, icon, action, dismissible, onDismiss, open, dismissLabel, role, className, children, ...rest }: BannerProps): react.JSX.Element | null;
1245
+
1246
+ interface SpinnerProps extends ComponentPropsWithRef<'span'> {
1247
+ /** `xs` 12, `sm` 14, `md` 16 (default), `lg` 20, `xl` 24, or `em` to follow the font size. */
1248
+ size?: IconSize | undefined;
1249
+ /** What is happening, announced once as a status. Default "Loading". */
1250
+ label?: string | undefined;
1251
+ /** Hides it from assistive tech when the text beside it already says what is happening. */
1252
+ decorative?: boolean | undefined;
1253
+ }
1254
+ /** An indeterminate activity indicator in `currentColor`. Slows down, never stops, under reduced motion. */
1255
+ declare function Spinner({ size, label, decorative, className, ...rest }: SpinnerProps): react.JSX.Element;
1256
+
1257
+ type ProgressTone = 'accent' | 'success' | 'warning' | 'danger' | 'neutral';
1258
+ type ProgressSize = 'sm' | 'md';
1259
+ type ProgressVariant = 'bar' | 'inline';
1260
+ interface ProgressProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
1261
+ /** Current value. Omit or pass `null` while the amount of work is unknown (indeterminate). */
1262
+ value?: number | null | undefined;
1263
+ /** Default 100. Pass the total so `value` can be a count: `value={460} max={859}`. */
1264
+ max?: number | undefined;
1265
+ /** Default 0. */
1266
+ min?: number | undefined;
1267
+ /** What is happening: "Verifying". Visible, and names the bar for assistive tech. */
1268
+ label?: ReactNode | undefined;
1269
+ /** Detail at the end: "460 of 859 · 3 min elapsed". A string also becomes `aria-valuetext`. */
1270
+ valueText?: ReactNode | undefined;
1271
+ /** Shows the percentage when `valueText` is not given. */
1272
+ showValue?: boolean | undefined;
1273
+ /** Fill colour. Default `accent`; `success` when done, `danger` when it failed. */
1274
+ tone?: ProgressTone | undefined;
1275
+ /** Bar thickness: `sm` 4px, `md` 8px (default). Inline uses the text size. */
1276
+ size?: ProgressSize | undefined;
1277
+ /** `bar` (default) is label, value and a track; `inline` is a Spinner beside the text for toolbars and buttons. */
1278
+ variant?: ProgressVariant | undefined;
1279
+ /** Names the bar when there is no `label`. */
1280
+ 'aria-label'?: string | undefined;
1281
+ }
1282
+ /**
1283
+ * Says that something is processing and, when known, how far along it is. Built on Base UI's Progress:
1284
+ * `role="progressbar"` with the aria value attributes, or none while indeterminate.
1285
+ */
1286
+ declare function Progress({ value, max, min, label, valueText, showValue, tone, size, variant, className, ...rest }: ProgressProps): react.JSX.Element;
1287
+
1288
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
1289
+ type HeadingSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
1290
+ type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span' | 'p';
1291
+ type TextTone = 'default' | 'muted' | 'subtle' | 'accent' | 'success' | 'warning' | 'danger' | 'info';
1292
+ interface HeadingProps extends ComponentPropsWithRef<'h2'> {
1293
+ /** The outline level, rendered as `h1`–`h6`. Default 2. */
1294
+ level?: HeadingLevel | undefined;
1295
+ /** Visual size from the type scale, independent of the level. Defaults by level: 3xl, 2xl, xl, lg, md, sm. */
1296
+ size?: HeadingSize | undefined;
1297
+ /** Render a different element and keep the look; `div`/`span` for a card title that is not an outline entry. */
1298
+ as?: HeadingElement | undefined;
1299
+ /** Colour. Default is the text colour. */
1300
+ tone?: TextTone | undefined;
1301
+ /** One line with an ellipsis. */
1302
+ truncate?: boolean | undefined;
1303
+ }
1304
+ /** A heading from the type scale. `level` is the semantics, `size` the look; they are set separately on purpose. */
1305
+ declare function Heading({ level, size, as, tone, truncate, className, ...rest }: HeadingProps): react.DetailedReactHTMLElement<{
1306
+ ref?: react.Ref<HTMLHeadingElement> | undefined;
1307
+ key?: react.Key | null | undefined;
1308
+ defaultChecked?: boolean | undefined;
1309
+ defaultValue?: string | number | readonly string[] | undefined;
1310
+ suppressContentEditableWarning?: boolean | undefined;
1311
+ suppressHydrationWarning?: boolean | undefined;
1312
+ accessKey?: string | undefined;
1313
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
1314
+ autoFocus?: boolean | undefined;
1315
+ contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
1316
+ contextMenu?: string | undefined;
1317
+ dir?: string | undefined;
1318
+ draggable?: (boolean | "true" | "false") | undefined;
1319
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
1320
+ hidden?: boolean | undefined;
1321
+ id?: string | undefined;
1322
+ lang?: string | undefined;
1323
+ nonce?: string | undefined;
1324
+ slot?: string | undefined;
1325
+ spellCheck?: (boolean | "true" | "false") | undefined;
1326
+ style?: react.CSSProperties | undefined;
1327
+ tabIndex?: number | undefined;
1328
+ title?: string | undefined;
1329
+ translate?: "yes" | "no" | undefined;
1330
+ radioGroup?: string | undefined;
1331
+ role?: react.AriaRole | undefined;
1332
+ about?: string | undefined;
1333
+ content?: string | undefined;
1334
+ datatype?: string | undefined;
1335
+ inlist?: any;
1336
+ prefix?: string | undefined;
1337
+ property?: string | undefined;
1338
+ rel?: string | undefined;
1339
+ resource?: string | undefined;
1340
+ rev?: string | undefined;
1341
+ typeof?: string | undefined;
1342
+ vocab?: string | undefined;
1343
+ autoCorrect?: string | undefined;
1344
+ autoSave?: string | undefined;
1345
+ color?: string | undefined;
1346
+ itemProp?: string | undefined;
1347
+ itemScope?: boolean | undefined;
1348
+ itemType?: string | undefined;
1349
+ itemID?: string | undefined;
1350
+ itemRef?: string | undefined;
1351
+ results?: number | undefined;
1352
+ security?: string | undefined;
1353
+ unselectable?: "on" | "off" | undefined;
1354
+ popover?: "" | "auto" | "manual" | "hint" | undefined;
1355
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
1356
+ popoverTarget?: string | undefined;
1357
+ inert?: boolean | undefined;
1358
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
1359
+ is?: string | undefined;
1360
+ exportparts?: string | undefined;
1361
+ part?: string | undefined;
1362
+ "aria-activedescendant"?: string | undefined;
1363
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
1364
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
1365
+ "aria-braillelabel"?: string | undefined;
1366
+ "aria-brailleroledescription"?: string | undefined;
1367
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
1368
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
1369
+ "aria-colcount"?: number | undefined;
1370
+ "aria-colindex"?: number | undefined;
1371
+ "aria-colindextext"?: string | undefined;
1372
+ "aria-colspan"?: number | undefined;
1373
+ "aria-controls"?: string | undefined;
1374
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
1375
+ "aria-describedby"?: string | undefined;
1376
+ "aria-description"?: string | undefined;
1377
+ "aria-details"?: string | undefined;
1378
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
1379
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
1380
+ "aria-errormessage"?: string | undefined;
1381
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
1382
+ "aria-flowto"?: string | undefined;
1383
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
1384
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
1385
+ "aria-hidden"?: (boolean | "true" | "false") | undefined;
1386
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
1387
+ "aria-keyshortcuts"?: string | undefined;
1388
+ "aria-label"?: string | undefined;
1389
+ "aria-labelledby"?: string | undefined;
1390
+ "aria-level"?: number | undefined;
1391
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
1392
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
1393
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
1394
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
1395
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
1396
+ "aria-owns"?: string | undefined;
1397
+ "aria-placeholder"?: string | undefined;
1398
+ "aria-posinset"?: number | undefined;
1399
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
1400
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
1401
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
1402
+ "aria-required"?: (boolean | "true" | "false") | undefined;
1403
+ "aria-roledescription"?: string | undefined;
1404
+ "aria-rowcount"?: number | undefined;
1405
+ "aria-rowindex"?: number | undefined;
1406
+ "aria-rowindextext"?: string | undefined;
1407
+ "aria-rowspan"?: number | undefined;
1408
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
1409
+ "aria-setsize"?: number | undefined;
1410
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
1411
+ "aria-valuemax"?: number | undefined;
1412
+ "aria-valuemin"?: number | undefined;
1413
+ "aria-valuenow"?: number | undefined;
1414
+ "aria-valuetext"?: string | undefined;
1415
+ children?: react.ReactNode | undefined;
1416
+ dangerouslySetInnerHTML?: {
1417
+ __html: string | TrustedHTML;
1418
+ } | undefined;
1419
+ onCopy?: react.ClipboardEventHandler<HTMLHeadingElement> | undefined;
1420
+ onCopyCapture?: react.ClipboardEventHandler<HTMLHeadingElement> | undefined;
1421
+ onCut?: react.ClipboardEventHandler<HTMLHeadingElement> | undefined;
1422
+ onCutCapture?: react.ClipboardEventHandler<HTMLHeadingElement> | undefined;
1423
+ onPaste?: react.ClipboardEventHandler<HTMLHeadingElement> | undefined;
1424
+ onPasteCapture?: react.ClipboardEventHandler<HTMLHeadingElement> | undefined;
1425
+ onCompositionEnd?: react.CompositionEventHandler<HTMLHeadingElement> | undefined;
1426
+ onCompositionEndCapture?: react.CompositionEventHandler<HTMLHeadingElement> | undefined;
1427
+ onCompositionStart?: react.CompositionEventHandler<HTMLHeadingElement> | undefined;
1428
+ onCompositionStartCapture?: react.CompositionEventHandler<HTMLHeadingElement> | undefined;
1429
+ onCompositionUpdate?: react.CompositionEventHandler<HTMLHeadingElement> | undefined;
1430
+ onCompositionUpdateCapture?: react.CompositionEventHandler<HTMLHeadingElement> | undefined;
1431
+ onFocus?: react.FocusEventHandler<HTMLHeadingElement> | undefined;
1432
+ onFocusCapture?: react.FocusEventHandler<HTMLHeadingElement> | undefined;
1433
+ onBlur?: react.FocusEventHandler<HTMLHeadingElement> | undefined;
1434
+ onBlurCapture?: react.FocusEventHandler<HTMLHeadingElement> | undefined;
1435
+ onChange?: react.ChangeEventHandler<HTMLHeadingElement, Element> | undefined;
1436
+ onChangeCapture?: react.ChangeEventHandler<HTMLHeadingElement, Element> | undefined;
1437
+ onBeforeInput?: react.InputEventHandler<HTMLHeadingElement> | undefined;
1438
+ onBeforeInputCapture?: react.InputEventHandler<HTMLHeadingElement> | undefined;
1439
+ onInput?: react.InputEventHandler<HTMLHeadingElement> | undefined;
1440
+ onInputCapture?: react.InputEventHandler<HTMLHeadingElement> | undefined;
1441
+ onReset?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1442
+ onResetCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1443
+ onSubmit?: react.SubmitEventHandler<HTMLHeadingElement> | undefined;
1444
+ onSubmitCapture?: react.SubmitEventHandler<HTMLHeadingElement> | undefined;
1445
+ onInvalid?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1446
+ onInvalidCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1447
+ onLoad?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1448
+ onLoadCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1449
+ onError?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1450
+ onErrorCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1451
+ onKeyDown?: react.KeyboardEventHandler<HTMLHeadingElement> | undefined;
1452
+ onKeyDownCapture?: react.KeyboardEventHandler<HTMLHeadingElement> | undefined;
1453
+ onKeyPress?: react.KeyboardEventHandler<HTMLHeadingElement> | undefined;
1454
+ onKeyPressCapture?: react.KeyboardEventHandler<HTMLHeadingElement> | undefined;
1455
+ onKeyUp?: react.KeyboardEventHandler<HTMLHeadingElement> | undefined;
1456
+ onKeyUpCapture?: react.KeyboardEventHandler<HTMLHeadingElement> | undefined;
1457
+ onAbort?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1458
+ onAbortCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1459
+ onCanPlay?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1460
+ onCanPlayCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1461
+ onCanPlayThrough?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1462
+ onCanPlayThroughCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1463
+ onDurationChange?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1464
+ onDurationChangeCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1465
+ onEmptied?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1466
+ onEmptiedCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1467
+ onEncrypted?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1468
+ onEncryptedCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1469
+ onEnded?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1470
+ onEndedCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1471
+ onLoadedData?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1472
+ onLoadedDataCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1473
+ onLoadedMetadata?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1474
+ onLoadedMetadataCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1475
+ onLoadStart?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1476
+ onLoadStartCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1477
+ onPause?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1478
+ onPauseCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1479
+ onPlay?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1480
+ onPlayCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1481
+ onPlaying?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1482
+ onPlayingCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1483
+ onProgress?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1484
+ onProgressCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1485
+ onRateChange?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1486
+ onRateChangeCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1487
+ onSeeked?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1488
+ onSeekedCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1489
+ onSeeking?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1490
+ onSeekingCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1491
+ onStalled?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1492
+ onStalledCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1493
+ onSuspend?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1494
+ onSuspendCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1495
+ onTimeUpdate?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1496
+ onTimeUpdateCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1497
+ onVolumeChange?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1498
+ onVolumeChangeCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1499
+ onWaiting?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1500
+ onWaitingCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1501
+ onAuxClick?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1502
+ onAuxClickCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1503
+ onClick?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1504
+ onClickCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1505
+ onContextMenu?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1506
+ onContextMenuCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1507
+ onDoubleClick?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1508
+ onDoubleClickCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1509
+ onDrag?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1510
+ onDragCapture?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1511
+ onDragEnd?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1512
+ onDragEndCapture?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1513
+ onDragEnter?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1514
+ onDragEnterCapture?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1515
+ onDragExit?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1516
+ onDragExitCapture?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1517
+ onDragLeave?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1518
+ onDragLeaveCapture?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1519
+ onDragOver?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1520
+ onDragOverCapture?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1521
+ onDragStart?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1522
+ onDragStartCapture?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1523
+ onDrop?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1524
+ onDropCapture?: react.DragEventHandler<HTMLHeadingElement> | undefined;
1525
+ onMouseDown?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1526
+ onMouseDownCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1527
+ onMouseEnter?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1528
+ onMouseLeave?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1529
+ onMouseMove?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1530
+ onMouseMoveCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1531
+ onMouseOut?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1532
+ onMouseOutCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1533
+ onMouseOver?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1534
+ onMouseOverCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1535
+ onMouseUp?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1536
+ onMouseUpCapture?: react.MouseEventHandler<HTMLHeadingElement> | undefined;
1537
+ onSelect?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1538
+ onSelectCapture?: react.ReactEventHandler<HTMLHeadingElement> | undefined;
1539
+ onTouchCancel?: react.TouchEventHandler<HTMLHeadingElement> | undefined;
1540
+ onTouchCancelCapture?: react.TouchEventHandler<HTMLHeadingElement> | undefined;
1541
+ onTouchEnd?: react.TouchEventHandler<HTMLHeadingElement> | undefined;
1542
+ onTouchEndCapture?: react.TouchEventHandler<HTMLHeadingElement> | undefined;
1543
+ onTouchMove?: react.TouchEventHandler<HTMLHeadingElement> | undefined;
1544
+ onTouchMoveCapture?: react.TouchEventHandler<HTMLHeadingElement> | undefined;
1545
+ onTouchStart?: react.TouchEventHandler<HTMLHeadingElement> | undefined;
1546
+ onTouchStartCapture?: react.TouchEventHandler<HTMLHeadingElement> | undefined;
1547
+ onPointerDown?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1548
+ onPointerDownCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1549
+ onPointerMove?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1550
+ onPointerMoveCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1551
+ onPointerUp?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1552
+ onPointerUpCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1553
+ onPointerCancel?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1554
+ onPointerCancelCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1555
+ onPointerEnter?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1556
+ onPointerLeave?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1557
+ onPointerOver?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1558
+ onPointerOverCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1559
+ onPointerOut?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1560
+ onPointerOutCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1561
+ onGotPointerCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1562
+ onGotPointerCaptureCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1563
+ onLostPointerCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1564
+ onLostPointerCaptureCapture?: react.PointerEventHandler<HTMLHeadingElement> | undefined;
1565
+ onScroll?: react.UIEventHandler<HTMLHeadingElement> | undefined;
1566
+ onScrollCapture?: react.UIEventHandler<HTMLHeadingElement> | undefined;
1567
+ onScrollEnd?: react.UIEventHandler<HTMLHeadingElement> | undefined;
1568
+ onScrollEndCapture?: react.UIEventHandler<HTMLHeadingElement> | undefined;
1569
+ onWheel?: react.WheelEventHandler<HTMLHeadingElement> | undefined;
1570
+ onWheelCapture?: react.WheelEventHandler<HTMLHeadingElement> | undefined;
1571
+ onAnimationStart?: react.AnimationEventHandler<HTMLHeadingElement> | undefined;
1572
+ onAnimationStartCapture?: react.AnimationEventHandler<HTMLHeadingElement> | undefined;
1573
+ onAnimationEnd?: react.AnimationEventHandler<HTMLHeadingElement> | undefined;
1574
+ onAnimationEndCapture?: react.AnimationEventHandler<HTMLHeadingElement> | undefined;
1575
+ onAnimationIteration?: react.AnimationEventHandler<HTMLHeadingElement> | undefined;
1576
+ onAnimationIterationCapture?: react.AnimationEventHandler<HTMLHeadingElement> | undefined;
1577
+ onToggle?: react.ToggleEventHandler<HTMLHeadingElement> | undefined;
1578
+ onBeforeToggle?: react.ToggleEventHandler<HTMLHeadingElement> | undefined;
1579
+ onTransitionCancel?: react.TransitionEventHandler<HTMLHeadingElement> | undefined;
1580
+ onTransitionCancelCapture?: react.TransitionEventHandler<HTMLHeadingElement> | undefined;
1581
+ onTransitionEnd?: react.TransitionEventHandler<HTMLHeadingElement> | undefined;
1582
+ onTransitionEndCapture?: react.TransitionEventHandler<HTMLHeadingElement> | undefined;
1583
+ onTransitionRun?: react.TransitionEventHandler<HTMLHeadingElement> | undefined;
1584
+ onTransitionRunCapture?: react.TransitionEventHandler<HTMLHeadingElement> | undefined;
1585
+ onTransitionStart?: react.TransitionEventHandler<HTMLHeadingElement> | undefined;
1586
+ onTransitionStartCapture?: react.TransitionEventHandler<HTMLHeadingElement> | undefined;
1587
+ className: string;
1588
+ 'data-size': HeadingSize;
1589
+ 'data-tone': TextTone;
1590
+ 'data-truncate': true | undefined;
1591
+ }, HTMLHeadingElement>;
1592
+
1593
+ type TextSize = 'xs' | 'sm' | 'md' | 'lg';
1594
+ type TextWeight = 'regular' | 'medium' | 'semibold';
1595
+ type TextAlign = 'start' | 'center' | 'end';
1596
+ type TextElement = 'p' | 'span' | 'div' | 'label' | 'li' | 'dt' | 'dd' | 'strong' | 'em' | 'small' | 'time' | 'figcaption' | 'legend';
1597
+ interface TextProps extends ComponentPropsWithRef<'p'> {
1598
+ /** Element to render. Default `p`; `span` inside other text. */
1599
+ as?: TextElement | undefined;
1600
+ /** `xs` 12 captions, `sm` 14 UI text (default), `md` body copy, `lg` lede. */
1601
+ size?: TextSize | undefined;
1602
+ /** Colour. `muted` for metadata, `subtle` for placeholders, status tones for inline status. */
1603
+ tone?: TextTone | undefined;
1604
+ weight?: TextWeight | undefined;
1605
+ align?: TextAlign | undefined;
1606
+ /** `true` keeps one line with an ellipsis; a number clamps to that many lines. */
1607
+ truncate?: boolean | number | undefined;
1608
+ /** Tabular figures, for numbers that line up in columns. */
1609
+ numeric?: boolean | undefined;
1610
+ }
1611
+ /** Running text and labels from the type scale. Parents own spacing: Text has no margins. */
1612
+ declare function Text({ as, size, tone, weight, align, truncate, numeric, className, style, ...rest }: TextProps): ReactElement;
1613
+
744
1614
  declare const version = "0.1.1";
745
1615
 
746
- export { Badge, Button, Card, Dialog, Inline, Kbd, Stack, version };
747
- export type { BadgeProps, BadgeSize, BadgeTone, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CardElement, CardPadding, CardProps, CardVariant, DialogActionsProps, DialogBodyProps, DialogCloseProps, DialogContentProps, DialogDescriptionProps, DialogRootProps, DialogSize, DialogTitleProps, InlineAlign, InlineElement, InlineJustify, InlineProps, KbdGroupProps, KbdProps, SpacingSize, StackAlign, StackElement, StackJustify, StackProps };
1616
+ export { ArchiveIcon, ArrowLeftIcon, ArrowRightIcon, Badge, Banner, BellIcon, BriefcaseIcon, Button, CalendarIcon, Card, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleCheckIcon, CircleXIcon, ClockIcon, CopyIcon, Dialog, DocumentIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, FilterIcon, FlagIcon, Heading, Icon, IconButton, InboxIcon, InfoIcon, Inline, Input, Kbd, LinkIcon, MailIcon, MapPinIcon, Menu, MenuIcon, MinusIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, PauseIcon, PlayIcon, PlusIcon, Progress, RefreshIcon, SearchIcon, Select, SettingsIcon, Spinner, Stack, StarIcon, SunIcon, Switch, Tabs, Text, Textarea, ThumbsDownIcon, ThumbsUpIcon, Toolbar, Tooltip, TrashIcon, UndoIcon, UserIcon, WarningIcon, XIcon, iconNames, version };
1617
+ export type { BadgeProps, BadgeSize, BadgeTone, BadgeVariant, BannerProps, BannerTone, ButtonProps, ButtonSize, ButtonVariant, CardElement, CardPadding, CardProps, CardVariant, CheckboxProps, ControlSize, DialogActionsProps, DialogBodyProps, DialogCloseProps, DialogContentProps, DialogDescriptionProps, DialogRootProps, DialogSize, DialogTitleProps, FieldProps, HeadingElement, HeadingLevel, HeadingProps, HeadingSize, IconButtonProps, IconGlyphProps, IconName, IconProps, IconSize, InlineAlign, InlineElement, InlineJustify, InlineProps, InputProps, KbdGroupProps, KbdProps, MenuAlign, MenuCheckboxItemProps, MenuContentProps, MenuGroupProps, MenuItemProps, MenuItemTone, MenuLinkItemProps, MenuRadioGroupProps, MenuRadioItemProps, MenuRootProps, MenuSeparatorProps, MenuSide, MenuTriggerProps, ProgressProps, ProgressSize, ProgressTone, ProgressVariant, SelectGroup, SelectOption, SelectProps, SpacingSize, SpinnerProps, StackAlign, StackElement, StackJustify, StackProps, SwitchProps, TabsListProps, TabsPanelProps, TabsRootProps, TabsTabProps, TextAlign, TextElement, TextProps, TextSize, TextTone, TextWeight, TextareaProps, ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSeparatorProps, ToolbarSpacerProps, TooltipAlign, TooltipProps, TooltipSide };