@sanity/ui 5.0.0-alpha.7 → 5.0.0-alpha.9

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.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/install.js +2 -1
  3. package/dist/index.d.ts +273 -79
  4. package/dist/index.js +51 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/styles.css +1 -1
  7. package/package.json +2 -2
  8. package/src/cli/install.ts +2 -1
  9. package/src/components/badge/Badge.tsx +53 -0
  10. package/src/components/badge/badge.css +6 -0
  11. package/src/components/badge/badge.props.ts +31 -0
  12. package/src/components/box/box.props.ts +7 -2
  13. package/src/components/button/button.props.ts +27 -9
  14. package/src/components/card/card.props.ts +6 -2
  15. package/src/components/checkbox/Checkbox.tsx +2 -1
  16. package/src/components/checkbox/checkbox.props.ts +11 -3
  17. package/src/components/code/code.props.ts +10 -3
  18. package/src/components/container/container.props.ts +6 -2
  19. package/src/components/dialog/Dialog.tsx +1 -1
  20. package/src/components/dialog/dialog.props.ts +13 -4
  21. package/src/components/eyebrow/eyebrow.props.ts +6 -2
  22. package/src/components/flex/flex.props.ts +6 -2
  23. package/src/components/grid/grid.props.ts +6 -2
  24. package/src/components/h-stack/hStack.props.ts +3 -1
  25. package/src/components/heading/heading.props.ts +8 -2
  26. package/src/components/icon/icon.props.ts +6 -2
  27. package/src/components/icon-button/iconButton.props.ts +7 -2
  28. package/src/components/index.css +1 -0
  29. package/src/components/indicator/indicator.props.ts +6 -2
  30. package/src/components/indicator-stack/indicatorStack.props.ts +3 -1
  31. package/src/components/inline/inline.props.ts +6 -2
  32. package/src/components/label/label.props.ts +7 -1
  33. package/src/components/link/link.props.ts +4 -4
  34. package/src/components/list/list.props.ts +27 -9
  35. package/src/components/popover/popover.props.ts +14 -4
  36. package/src/components/press-area/pressArea.props.ts +3 -1
  37. package/src/components/radio/radio.props.ts +7 -2
  38. package/src/components/skip-to-content/skipToContent.props.ts +9 -3
  39. package/src/components/spinner/Spinner.tsx +1 -1
  40. package/src/components/spinner/spinner.props.ts +3 -0
  41. package/src/components/switch/switch.props.ts +7 -2
  42. package/src/components/text/text.props.ts +6 -2
  43. package/src/components/tooltip/tooltip.props.ts +12 -4
  44. package/src/components/tooltip-group/tooltipGroup.props.ts +3 -1
  45. package/src/components/v-stack/vStack.props.ts +3 -1
  46. package/src/components/visually-hidden/visuallyHidden.props.ts +6 -2
  47. package/src/index.ts +1 -0
  48. package/src/version.ts +2 -2
package/README.md CHANGED
@@ -46,7 +46,7 @@ import '@sanity/ui/styles.css'
46
46
 
47
47
  ```tsx
48
48
  import {Box, Flex, Card, Heading, Text, Button} from '@sanity/ui'
49
- import {AddIcon} from '@sanity/icons'
49
+ import {AddIcon} from '@sanity/icons/Add'
50
50
 
51
51
  export default function App() {
52
52
  return (
@@ -23,7 +23,8 @@ function exactFromRange(range) {
23
23
  *
24
24
  * Icons is already a dependency, so the package manager installs it either way.
25
25
  * It is listed explicitly because apps import icons directly to pass to
26
- * components (`<Button iconStart={AddIcon} />`), and under pnpm an import that
26
+ * components (`import {AddIcon} from '@sanity/icons/Add'`, then
27
+ * `<Button iconStart={AddIcon} />`), and under pnpm an import that
27
28
  * isn't in the app's own package.json doesn't resolve. Dependencies the app
28
29
  * never imports itself (react-refractor, clsx) are left to the package manager.
29
30
  * React/react-dom are peers that belong to the host app, so they are left out
package/dist/index.d.ts CHANGED
@@ -16,6 +16,31 @@ declare const ALIGN_ITEMS: readonly [
16
16
  /** @public */
17
17
  export declare type AlignItems = (typeof ALIGN_ITEMS)[number];
18
18
 
19
+ /** @public */
20
+ export declare function Badge<T extends ElementType = "span">({
21
+ tone,
22
+ ...props
23
+ }: BadgeProps<T> &
24
+ Omit<ComponentPropsWithRef<T>, keyof BadgeProps<T>>): JSX.Element;
25
+
26
+ /** @public */
27
+ export declare interface BadgeProps<
28
+ T extends React.ElementType = "span",
29
+ > extends ToneProps {
30
+ /**
31
+ * HTML element to render.
32
+ */
33
+ as?: T;
34
+ /**
35
+ * Shows an icon in the start position (left side in left-to-right languages).
36
+ */
37
+ iconStart?: React.ElementType | React.ReactNode;
38
+ /**
39
+ * Sets Badge's text label. Use instead of children unless you have a special use case.
40
+ */
41
+ text?: string;
42
+ }
43
+
19
44
  declare type BorderProps = {
20
45
  /** CSS **border** property */
21
46
  border?: Responsive<boolean>;
@@ -44,9 +69,14 @@ export declare function Box<T extends ElementType = "div">({
44
69
  export declare interface BoxProps<
45
70
  T extends React.ElementType = "div",
46
71
  > extends LayoutProps {
47
- /** Element to render */
72
+ /**
73
+ * HTML element or component to render.
74
+ */
48
75
  as?: T;
49
- /** CSS **display** property */
76
+ /**
77
+ * CSS `display` property.
78
+ * @remarks Does not include `'flex'` or `'grid'`. Use the Flex or Grid components for those.
79
+ */
50
80
  display?: Responsive<DisplayBlock>;
51
81
  }
52
82
 
@@ -71,23 +101,41 @@ declare type ButtonLevel = (typeof BUTTON_LEVEL)[number];
71
101
 
72
102
  /** @public */
73
103
  export declare interface ButtonProps<T extends React.ElementType = "button"> {
74
- /** Element to render */
104
+ /**
105
+ * HTML element to render.
106
+ */
75
107
  as?: InteractiveAs<T>;
76
- /** Composite prop for setting padding and gap */
108
+ /**
109
+ * Sets padding and gap together to specify size.
110
+ */
77
111
  density?: ButtonDensity;
78
- /** Set CSS **width** property to 100% */
112
+ /**
113
+ * Sets Button to fill the width of its container.
114
+ */
79
115
  fullWidth?: Responsive<boolean>;
80
- /** Starting icon */
116
+ /**
117
+ * Shows an icon in the start position (left side in left-to-right languages).
118
+ */
81
119
  iconStart?: React.ElementType | React.ReactNode;
82
- /** Ending icon */
120
+ /**
121
+ * Shows an icon in the end position (right side in left-to-right languages).
122
+ */
83
123
  iconEnd?: React.ElementType | React.ReactNode;
84
- /** Button level */
124
+ /**
125
+ * Sets the importance of Button's action.
126
+ */
85
127
  level?: ButtonLevel;
86
- /** Loading state */
128
+ /**
129
+ * Places Button into a loading state.
130
+ */
87
131
  loading?: boolean;
88
- /** Button text */
132
+ /**
133
+ * Sets Button's text label.
134
+ */
89
135
  text?: string;
90
- /** Button tone */
136
+ /**
137
+ * Sets Button's semantic meaning and related color.
138
+ */
91
139
  tone?: ButtonTone;
92
140
  }
93
141
 
@@ -104,9 +152,13 @@ export declare function Card<T extends ElementType = "div">({
104
152
  /** @public */
105
153
  export declare interface CardProps<T extends React.ElementType = "div">
106
154
  extends MarginProps, ToneProps {
107
- /** Element to render */
155
+ /**
156
+ * HTML element or component to render.
157
+ */
108
158
  as?: T;
109
- /** Composite prop for setting padding and border radius */
159
+ /**
160
+ * Sets padding, gap, and border-radius together to specify size. This prop is used in place of separate `padding`, `gap`, and `border-radius` props.
161
+ */
110
162
  density?: Responsive<Density>;
111
163
  }
112
164
 
@@ -116,11 +168,19 @@ export declare function Checkbox(props: CheckboxProps): JSX.Element;
116
168
  /** @beta */
117
169
  export declare interface CheckboxProps
118
170
  extends React.ComponentProps<"input">, MarginProps {
119
- /** Error state */
171
+ /**
172
+ * Applies error styling to the checkbox mark.
173
+ * @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
174
+ */
120
175
  error?: boolean;
121
- /** Indeterminate state */
176
+ /**
177
+ * Renders the "mixed state" mark (a horizontal line).
178
+ * @remarks Use when the checkbox controls a group with some-but-not-all children checked.
179
+ */
122
180
  indeterminate?: boolean;
123
- /** Input label */
181
+ /**
182
+ * Visible label next to the checkbox.
183
+ */
124
184
  label: React.ReactNode;
125
185
  }
126
186
 
@@ -140,11 +200,18 @@ export declare interface CodeProps<T extends CodeTag = "pre"> extends Omit<
140
200
  TypographyProps,
141
201
  "align" | "truncate" | "tone"
142
202
  > {
143
- /** Element to render */
203
+ /**
204
+ * HTML element or component to render.
205
+ * @remarks The defined element wraps an inner `<code>` tag.
206
+ */
144
207
  as?: T;
145
- /** Refractor language for syntax highlighting */
208
+ /**
209
+ * Refractor language for syntax highlighting.
210
+ */
146
211
  language?: string;
147
- /** CSS **font-size** property */
212
+ /**
213
+ * Sets font size.
214
+ */
148
215
  size?: Responsive<CodeSize>;
149
216
  }
150
217
 
@@ -166,9 +233,13 @@ declare const CONTAINER_SIZE: readonly [0, 1, 2, 3, 4, 5];
166
233
  export declare interface ContainerProps<
167
234
  T extends React.ElementType = "div",
168
235
  > extends LayoutProps {
169
- /** Element to render */
236
+ /**
237
+ * HTML element or component to render.
238
+ */
170
239
  as?: T;
171
- /** CSS **max-width** property */
240
+ /**
241
+ * Maximum width of the container.
242
+ */
172
243
  size?: Responsive<ContainerSize>;
173
244
  }
174
245
 
@@ -203,13 +274,22 @@ export declare interface DialogProps extends Omit<
203
274
  React.ComponentProps<"dialog">,
204
275
  "open"
205
276
  > {
206
- /** Text to be displayed as the dialog's heading; optional but recommended for optimal accessibility and presentation */
277
+ /**
278
+ * Text for the dialog heading.
279
+ * @remarks Recommended for accessibility. The component sets `aria-labelledby` to the heading when you give this prop.
280
+ */
207
281
  header?: string;
208
- /** Used to set the value of open to false. Fires whenever the dialog is closed, either programmatically or by the user (via Esc key, clicking background, clicking the dialog's close button, or any other means.) */
282
+ /**
283
+ * A function to call alongside the native `close` event.
284
+ * @remarks Use it to set `open` back to `false`. It runs for every close cause: the Escape key, a backdrop click, the close button, or a programmatic close.
285
+ */
209
286
  onClose: React.ReactEventHandler<HTMLDialogElement>;
210
- /** Whether the dialog is open; defaults to false. */
287
+ /**
288
+ * Toggles the dialog's open state.
289
+ * @remarks `true` calls `showModal()` on the element. `false` calls `close()`.
290
+ */
211
291
  open?: boolean;
212
- /** Max width of the dialog */
292
+ /** Sets the max width of the dialog */
213
293
  size?: Responsive<ContainerSize>;
214
294
  }
215
295
 
@@ -257,9 +337,13 @@ declare const EYEBROW_SIZE: readonly [0, 1, 2, 3, 4];
257
337
  export declare interface EyebrowProps<
258
338
  T extends React.ElementType = "span",
259
339
  > extends TypographyProps {
260
- /** Element to render */
340
+ /**
341
+ * HTML element to render.
342
+ */
261
343
  as?: T;
262
- /** CSS **font-size** property */
344
+ /**
345
+ * Sets font size. Uses the same scale as Label.
346
+ */
263
347
  size?: Responsive<EyebrowSize>;
264
348
  }
265
349
 
@@ -311,9 +395,13 @@ export declare type FlexParentProps = {
311
395
  /** @public */
312
396
  export declare interface FlexProps<T extends React.ElementType = "div">
313
397
  extends FlexParentProps, GapProps, LayoutProps {
314
- /** Element to render */
398
+ /**
399
+ * HTML element or component to render.
400
+ */
315
401
  as?: T;
316
- /** CSS **display** property */
402
+ /**
403
+ * CSS `display` property.
404
+ */
317
405
  display?: Responsive<DisplayFlex>;
318
406
  }
319
407
 
@@ -387,9 +475,13 @@ export declare type GridParentProps = {
387
475
  /** @public */
388
476
  export declare interface GridProps<T extends React.ElementType = "div">
389
477
  extends GridParentProps, GapProps, LayoutProps {
390
- /** Element to render */
478
+ /**
479
+ * HTML element or component to render.
480
+ */
391
481
  as?: T;
392
- /** CSS **display** property */
482
+ /**
483
+ * CSS `display` property.
484
+ */
393
485
  display?: Responsive<DisplayGrid>;
394
486
  }
395
487
 
@@ -407,9 +499,15 @@ declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
407
499
 
408
500
  /** @public */
409
501
  export declare interface HeadingProps extends TypographyProps {
410
- /** Element to render */
502
+ /**
503
+ * Semantic heading element to render.
504
+ * @remarks Always set this explicitly.
505
+ */
411
506
  as?: HeadingTag;
412
- /** CSS **font-size** property */
507
+ /**
508
+ * Sets font size.
509
+ * @remarks Independent of `as`.
510
+ */
413
511
  size?: Responsive<HeadingSize>;
414
512
  }
415
513
 
@@ -436,7 +534,9 @@ export declare function HStack<T extends ElementType = "div">(
436
534
  export declare interface HStackProps<
437
535
  T extends React.ElementType = "div",
438
536
  > extends Pick<GapProps, "gap"> {
439
- /** Element to render */
537
+ /**
538
+ * HTML element or component to render.
539
+ */
440
540
  as?: T;
441
541
  }
442
542
 
@@ -458,9 +558,14 @@ export declare interface IconButtonProps<
458
558
  ButtonProps<T>,
459
559
  "as" | "density" | "level" | "loading" | "tone"
460
560
  > {
461
- /** Button label */
561
+ /**
562
+ * Accessible name for the button.
563
+ * @remarks Because IconButtons have no visible text, this is required.
564
+ */
462
565
  "aria-label": string;
463
- /** Icon */
566
+ /**
567
+ * Icon to render.
568
+ */
464
569
  icon: React_2.ComponentType<SVGProps<SVGSVGElement>>;
465
570
  }
466
571
 
@@ -471,9 +576,13 @@ export declare interface IconProps
471
576
  Pick<TypographyProps, "muted">,
472
577
  MarginProps,
473
578
  ToneProps {
474
- /** Icon to render */
579
+ /**
580
+ * The icon component to render.
581
+ */
475
582
  icon: React.ComponentType<SVGProps<SVGSVGElement>>;
476
- /** CSS **font-size** property */
583
+ /**
584
+ * Sets icon size.
585
+ */
477
586
  size?: Responsive<IconSize>;
478
587
  }
479
588
 
@@ -491,9 +600,13 @@ export declare function Indicator<T extends ElementType = "span">({
491
600
  export declare interface IndicatorProps<
492
601
  T extends React.ElementType = "span",
493
602
  > extends ToneProps {
494
- /** Element to render */
603
+ /**
604
+ * HTML element to render.
605
+ */
495
606
  as?: T;
496
- /** Label for aria-label attribute */
607
+ /**
608
+ * Accessible label.
609
+ */
497
610
  label?: string;
498
611
  }
499
612
 
@@ -507,7 +620,9 @@ export declare function IndicatorStack<T extends ElementType = "div">(
507
620
  export declare interface IndicatorStackProps<
508
621
  T extends React.ElementType = "div",
509
622
  > {
510
- /** Element to render */
623
+ /**
624
+ * HTML element to render.
625
+ */
511
626
  as?: T;
512
627
  }
513
628
 
@@ -522,9 +637,13 @@ export declare function Inline<T extends ElementType = "div">(
522
637
  export declare interface InlineProps<
523
638
  T extends React.ElementType = "div",
524
639
  > extends PaddingProps {
525
- /** Element to render */
640
+ /**
641
+ * HTML element or component to render.
642
+ */
526
643
  as?: T;
527
- /** CSS **gap** property */
644
+ /**
645
+ * Space between children.
646
+ */
528
647
  gap?: Responsive<SpaceInherit>;
529
648
  }
530
649
 
@@ -553,8 +672,14 @@ export declare function Label(props: LabelProps): JSX.Element;
553
672
  /** @beta */
554
673
  export declare interface LabelProps
555
674
  extends React.ComponentProps<"label">, MarginProps {
556
- /** Element to render */
675
+ /**
676
+ * Renders the label in a muted color.
677
+ */
557
678
  disabled?: boolean;
679
+ /**
680
+ * Renders the label in the error color.
681
+ * @remarks Use when the linked input has a validation error.
682
+ */
558
683
  error?: boolean;
559
684
  }
560
685
 
@@ -579,12 +704,12 @@ export declare function Link({ underlined, ...props }: LinkProps): JSX.Element;
579
704
 
580
705
  /** @beta */
581
706
  export declare interface LinkProps extends React.ComponentProps<"a"> {
582
- /** If true, sets `target="_blank"` and `rel="noopener noreferrer"` */
707
+ /**
708
+ * Sets the link to `target="_blank"` and `rel="noopener noreferrer"`.
709
+ */
583
710
  openInNewTab?: boolean;
584
711
  /**
585
- * If true, sets `text-decoration: underline`
586
- *
587
- * @defaultValue true
712
+ * Underlines the link.
588
713
  */
589
714
  underlined?: boolean;
590
715
  }
@@ -604,9 +729,13 @@ declare function ListButtonItem<T extends ElementType = "button">({
604
729
  export declare interface ListButtonItemProps<
605
730
  T extends React_2.ElementType = "button",
606
731
  > extends ListItemProps {
607
- /** Element to render */
732
+ /**
733
+ * Element or component to render for the press target.
734
+ */
608
735
  as?: InteractiveAs<T>;
609
- /** Selected state */
736
+ /**
737
+ * Marks the row as the current selection.
738
+ */
610
739
  selected?: boolean;
611
740
  }
612
741
 
@@ -616,11 +745,17 @@ declare function ListItemImage(props: ComponentProps<"img">): JSX.Element;
616
745
 
617
746
  /** @beta */
618
747
  export declare interface ListItemProps extends React_2.ComponentProps<"li"> {
619
- /** Composite prop for setting padding and gap */
748
+ /**
749
+ * Sets horizontal padding, gap, and minimum row height together.
750
+ */
620
751
  density?: Responsive<Density>;
621
- /** Starting slot */
752
+ /**
753
+ * Slot at the left edge of the row.
754
+ */
622
755
  start?: React_2.ReactNode;
623
- /** Ending slot */
756
+ /**
757
+ * Slot at the right edge of the row.
758
+ */
624
759
  end?: React_2.ReactNode;
625
760
  }
626
761
 
@@ -633,11 +768,17 @@ declare function ListItemText<T extends ElementType = "div">(
633
768
  export declare interface ListItemTextProps<
634
769
  T extends React_2.ElementType = "div",
635
770
  > {
636
- /** Element to render */
771
+ /**
772
+ * HTML element to render.
773
+ */
637
774
  as?: T;
638
- /** Title text */
775
+ /**
776
+ * Main label.
777
+ */
639
778
  title?: React_2.ReactNode;
640
- /** Subtitle text */
779
+ /**
780
+ * Text below the title.
781
+ */
641
782
  subtitle?: React_2.ReactNode;
642
783
  }
643
784
 
@@ -646,7 +787,9 @@ export declare interface ListProps<T extends ListTag = "ul"> extends Pick<
646
787
  GapProps,
647
788
  "gap"
648
789
  > {
649
- /** Element to render */
790
+ /**
791
+ * HTML element to render.
792
+ */
650
793
  as?: T;
651
794
  }
652
795
 
@@ -754,13 +897,23 @@ export declare interface PopoverProps
754
897
  extends
755
898
  Omit<React.ComponentProps<"div">, "children" | "content">,
756
899
  PlacementProps {
757
- /** Anchor name for positioning */
900
+ /**
901
+ * Shared anchor identifier.
902
+ * @remarks Set the same value on a Tooltip and a Popover to point both at one trigger.
903
+ */
758
904
  anchorName?: React.ReactNode;
759
- /** Focusable trigger element */
905
+ /**
906
+ * The trigger element.
907
+ * @remarks Popover clones it and attaches the `popovertarget` attribute that opens the floating layer.
908
+ */
760
909
  children: React.ReactElement<Record<string, unknown>>;
761
- /** Popover content */
910
+ /**
911
+ * The floating content.
912
+ */
762
913
  content?: React.ReactNode;
763
- /** Render tooltip in portal */
914
+ /**
915
+ * Renders the content into `document.body` through a React portal instead of inline.
916
+ */
764
917
  portal?: boolean;
765
918
  }
766
919
 
@@ -807,7 +960,9 @@ export declare function PressArea<T extends ElementType = "button">(
807
960
  export declare interface PressAreaProps<
808
961
  T extends React.ElementType = "button",
809
962
  > {
810
- /** Element to render */
963
+ /**
964
+ * Element or component to render.
965
+ */
811
966
  as?: InteractiveAs<T>;
812
967
  }
813
968
 
@@ -817,9 +972,14 @@ export declare function Radio(props: RadioProps): JSX.Element;
817
972
  /** @beta */
818
973
  export declare interface RadioProps
819
974
  extends React.ComponentProps<"input">, MarginProps {
820
- /** Error state */
975
+ /**
976
+ * Applies error styling to the radio mark.
977
+ * @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
978
+ */
821
979
  error?: boolean;
822
- /** Input label */
980
+ /**
981
+ * Visible label next to the radio.
982
+ */
823
983
  label: React.ReactNode;
824
984
  }
825
985
 
@@ -867,12 +1027,18 @@ export declare function SkipToContent(props: SkipToContentProps): JSX.Element;
867
1027
  /** @beta */
868
1028
  export declare interface SkipToContentProps extends React.ComponentProps<"a"> {
869
1029
  /**
870
- * Anchor href. The target element should be focusable or have `tabindex="-1"`.
1030
+ * Same-page fragment to jump to.
1031
+ * @remarks Note: The hash character # is required for proper linking.
871
1032
  */
872
1033
  href: string;
873
- /** Visible/announced label */
1034
+ /**
1035
+ * Visible and announced text.
1036
+ */
874
1037
  label: string;
875
- /** Use label instead */
1038
+ /**
1039
+ * Not accepted.
1040
+ * @remarks Pass text via `label`.
1041
+ */
876
1042
  children?: never;
877
1043
  }
878
1044
 
@@ -922,6 +1088,9 @@ export declare function Spinner({ size, ...props }: SpinnerProps): JSX.Element;
922
1088
 
923
1089
  /** @public */
924
1090
  export declare interface SpinnerProps extends React.ComponentProps<"svg"> {
1091
+ /**
1092
+ * Size of the spinner icon.
1093
+ */
925
1094
  size?: Responsive<IconSize>;
926
1095
  }
927
1096
 
@@ -931,9 +1100,14 @@ export declare function Switch(props: SwitchProps): JSX.Element;
931
1100
  /** @beta */
932
1101
  export declare interface SwitchProps
933
1102
  extends React.ComponentProps<"input">, MarginProps {
934
- /** Error state */
1103
+ /**
1104
+ * Applies error styling to the switch track.
1105
+ * @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
1106
+ */
935
1107
  error?: boolean;
936
- /** Input label */
1108
+ /**
1109
+ * Visible label next to the switch.
1110
+ */
937
1111
  label: React.ReactNode;
938
1112
  }
939
1113
 
@@ -956,9 +1130,13 @@ export declare type TextAlign = (typeof TEXT_ALIGN)[number];
956
1130
  export declare interface TextProps<
957
1131
  T extends React.ElementType = "span",
958
1132
  > extends TypographyProps {
959
- /** Element to render */
1133
+ /**
1134
+ * HTML element to render.
1135
+ */
960
1136
  as?: T;
961
- /** CSS **font-size** property */
1137
+ /**
1138
+ * Sets font size.
1139
+ */
962
1140
  size?: Responsive<TextSize>;
963
1141
  }
964
1142
 
@@ -994,7 +1172,9 @@ export declare function TooltipGroup<T extends ElementType = "div">(
994
1172
  export declare interface TooltipGroupProps<
995
1173
  T extends React.ElementType = "div",
996
1174
  > {
997
- /** Element to render */
1175
+ /**
1176
+ * HTML element to render.
1177
+ */
998
1178
  as?: T;
999
1179
  }
1000
1180
 
@@ -1003,13 +1183,21 @@ export declare interface TooltipProps
1003
1183
  extends
1004
1184
  Omit<React.ComponentProps<"div">, "children" | "content">,
1005
1185
  PlacementProps {
1006
- /** Anchor name for positioning */
1186
+ /**
1187
+ * Shared anchor identifier.
1188
+ */
1007
1189
  anchorName?: React.ReactNode;
1008
- /** Focusable trigger element */
1190
+ /**
1191
+ * The trigger element.
1192
+ */
1009
1193
  children: React.ReactElement<Record<string, unknown>>;
1010
- /** Tooltip content */
1194
+ /**
1195
+ * The tooltip label.
1196
+ */
1011
1197
  content?: React.ReactNode;
1012
- /** Render tooltip in portal */
1198
+ /**
1199
+ * Renders the label into `document.body` through a React portal instead of inline.
1200
+ */
1013
1201
  portal?: boolean;
1014
1202
  }
1015
1203
 
@@ -1047,9 +1235,13 @@ export declare function VisuallyHidden<T extends ElementType = "span">(
1047
1235
  export declare interface VisuallyHiddenProps<
1048
1236
  T extends React.ElementType = "span",
1049
1237
  > {
1050
- /** Element to render */
1238
+ /**
1239
+ * HTML element to render.
1240
+ */
1051
1241
  as?: T;
1052
- /** If true, element is visible on :focus-visible */
1242
+ /**
1243
+ * If true, the element becomes visible on `:focus-visible`.
1244
+ */
1053
1245
  visibleOnFocus?: boolean;
1054
1246
  }
1055
1247
 
@@ -1062,7 +1254,9 @@ export declare function VStack<T extends ElementType = "div">(
1062
1254
  export declare interface VStackProps<
1063
1255
  T extends React.ElementType = "div",
1064
1256
  > extends Pick<GapProps, "gap"> {
1065
- /** Element to render */
1257
+ /**
1258
+ * HTML element or component to render.
1259
+ */
1066
1260
  as?: T;
1067
1261
  }
1068
1262