@wistia/ui 0.4.10-beta.f4fe6fa2.2799dfc → 0.4.10

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.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
3
+ import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ChangeEvent, ForwardedRef, Ref, JSXElementConstructor, ElementType as ElementType$1, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
4
4
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
5
5
  import * as styled_components from 'styled-components';
6
6
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
@@ -414,20 +414,6 @@ declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
414
414
  label: string;
415
415
  } & react.RefAttributes<HTMLDivElement>>;
416
416
 
417
- type UnknownRecord = Record<string, unknown>;
418
- type PropsOf<Component extends ElementType> = ComponentPropsWithoutRef<Component>;
419
- type ExtendedProps<Props = UnknownRecord, OverrideProps = UnknownRecord> = Omit<Props, keyof OverrideProps> & OverrideProps;
420
- type ComponentProp<Component extends ElementType> = {
421
- renderAs?: Component;
422
- };
423
- /**
424
- * extend the polymorphic component props to always include children
425
- */
426
- type PolymorphicComponentProps<Component extends ElementType, Props = UnknownRecord> = ExtendedProps<PropsOf<Component>, ComponentProp<Component> & Props> & {
427
- children?: ReactNode;
428
- ref?: ComponentPropsWithRef<Component>['ref'];
429
- };
430
-
431
417
  type Spacings = 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09';
432
418
 
433
419
  type JustifyContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'space-evenly';
@@ -440,7 +426,6 @@ type Gap = {
440
426
  column: Spacings;
441
427
  row: Spacings;
442
428
  };
443
- declare const DEFAULT_ELEMENT$1 = "div";
444
429
  /**
445
430
  * CSS property => Box prop:
446
431
  * flex-direction => direction
@@ -451,7 +436,7 @@ declare const DEFAULT_ELEMENT$1 = "div";
451
436
  * gap => gap
452
437
  * display: inline-flex => inline
453
438
  */
454
- type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
439
+ type BoxProps = ComponentPropsWithoutRef<'div'> & {
455
440
  /**
456
441
  * Specifies how the browser distributes space between and around
457
442
  * items along the cross-axis of their container; has no effect on
@@ -528,7 +513,6 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
528
513
  * *Note: only works for nested `<Box />`*
529
514
  */
530
515
  order?: number | 'inherit' | 'initial' | 'unset';
531
- renderAs?: ElementType;
532
516
  /**
533
517
  * Specifies how items will shrink inside the container when the default size of
534
518
  * items is larger than their container
@@ -544,8 +528,9 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
544
528
  /**
545
529
  * Box is a layout container using [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox).
546
530
  */
547
- declare const Box: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, BoxProps>) => react.ReactElement | null) & {
548
- [x: string]: unknown;
531
+ declare const Box: {
532
+ ({ alignContent, alignItems, alignSelf, basis, children, direction, fill, fillViewport, gap, grow, hasBoxParent, inline, justifyContent, order, shrink, wrapItems, ...otherProps }: BoxProps): JSX.Element;
533
+ displayName: string;
549
534
  };
550
535
 
551
536
  type BreadcrumbsProps = ComponentPropsWithoutRef<'div'> & {
@@ -908,6 +893,26 @@ declare const CheckboxGroup: {
908
893
  displayName: string;
909
894
  };
910
895
 
896
+ type ExtendedProps<Props = Record<string, unknown>, OverrideProps = Record<string, unknown>> = Omit<Props, keyof OverrideProps> & OverrideProps;
897
+ type ElementType = JSXElementConstructor<any> | keyof JSX.IntrinsicElements;
898
+ type PropsOf<C extends ElementType> = JSX.LibraryManagedAttributes<C, ComponentPropsWithoutRef<C>>;
899
+ type ComponentProp<C> = {
900
+ /**
901
+ * Render a different element or component
902
+ *
903
+ * @type ElementType | ComponentType
904
+ * @default 'div'
905
+ */
906
+ renderAs?: C;
907
+ };
908
+ type InheritedProps<C extends ElementType, Props = Record<string, unknown>> = ExtendedProps<PropsOf<C>, Props>;
909
+ type PolymorphicRef<C> = C extends ElementType ? ComponentPropsWithRef<C>['ref'] : never;
910
+ type PolymorphicComponentProps<C, Props = Record<string, unknown>> = C extends ElementType ? InheritedProps<C, ComponentProp<C> & Props> & {
911
+ ref?: PolymorphicRef<C>;
912
+ } : Props & {
913
+ renderAs: ElementType;
914
+ };
915
+
911
916
  type AlignmentTypes$1 = 'center' | 'justify' | 'left' | 'right';
912
917
  declare const variantStyleMap$1: {
913
918
  hero: styled_components.FlattenSimpleInterpolation;
@@ -952,7 +957,7 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
952
957
  * Prevents text from being highlighted and copied
953
958
  */
954
959
  preventUserSelect?: boolean;
955
- renderAs?: ElementType;
960
+ renderAs?: ElementType$1;
956
961
  /**
957
962
  * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
958
963
  */
@@ -961,9 +966,89 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
961
966
  /**
962
967
  * Displaying heading text, both visually and semantically
963
968
  */
964
- declare const Heading: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement | null) & {
965
- [x: string]: unknown;
966
- };
969
+ declare const Heading: (<C = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, "key" | "disabled" | keyof react.HTMLAttributes<HTMLHeadingElement> | "align" | "ellipsis" | "inline" | "colorScheme" | "variant" | "renderAs" | "preventUserSelect"> & {
970
+ renderAs?: any;
971
+ } & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
972
+ /**
973
+ * The horizontal alignment
974
+ * <br />
975
+ * _Note: this only affects block elements_
976
+ */
977
+ align?: AlignmentTypes$1;
978
+ /**
979
+ * The content of the heading
980
+ */
981
+ children: ReactNode;
982
+ /**
983
+ * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
984
+ */
985
+ colorScheme?: ColorSchemeTypes;
986
+ /**
987
+ * Styles to text as disabled
988
+ */
989
+ disabled?: boolean;
990
+ /**
991
+ * Attempt to keep the text to a single line by truncating with an ellipsis
992
+ * <br />
993
+ * _Note: this only affects block elements_
994
+ */
995
+ ellipsis?: boolean;
996
+ /**
997
+ * Display the text as inline content
998
+ */
999
+ inline?: boolean;
1000
+ /**
1001
+ * Prevents text from being highlighted and copied
1002
+ */
1003
+ preventUserSelect?: boolean;
1004
+ renderAs?: ElementType$1;
1005
+ /**
1006
+ * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
1007
+ */
1008
+ variant?: keyof typeof variantStyleMap$1;
1009
+ } & {
1010
+ ref?: any;
1011
+ }) | (Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
1012
+ /**
1013
+ * The horizontal alignment
1014
+ * <br />
1015
+ * _Note: this only affects block elements_
1016
+ */
1017
+ align?: AlignmentTypes$1;
1018
+ /**
1019
+ * The content of the heading
1020
+ */
1021
+ children: ReactNode;
1022
+ /**
1023
+ * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1024
+ */
1025
+ colorScheme?: ColorSchemeTypes;
1026
+ /**
1027
+ * Styles to text as disabled
1028
+ */
1029
+ disabled?: boolean;
1030
+ /**
1031
+ * Attempt to keep the text to a single line by truncating with an ellipsis
1032
+ * <br />
1033
+ * _Note: this only affects block elements_
1034
+ */
1035
+ ellipsis?: boolean;
1036
+ /**
1037
+ * Display the text as inline content
1038
+ */
1039
+ inline?: boolean;
1040
+ /**
1041
+ * Prevents text from being highlighted and copied
1042
+ */
1043
+ preventUserSelect?: boolean;
1044
+ renderAs?: ElementType$1;
1045
+ /**
1046
+ * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
1047
+ */
1048
+ variant?: keyof typeof variantStyleMap$1;
1049
+ } & {
1050
+ renderAs: keyof react.JSX.IntrinsicElements | react.JSXElementConstructor<any>;
1051
+ })>, never> & Record<string, never>;
967
1052
 
968
1053
  declare const iconMap: {
969
1054
  'ab-test': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
@@ -1548,7 +1633,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
1548
1633
  /**
1549
1634
  * This will inherit the jsdoc block from PolymorphicComponent
1550
1635
  */
1551
- renderAs?: ElementType;
1636
+ renderAs?: ElementType$1;
1552
1637
  /**
1553
1638
  * The text style to display
1554
1639
  */
@@ -1557,9 +1642,103 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
1557
1642
  /**
1558
1643
  * Used for rending paragraphs and inline text.
1559
1644
  */
1560
- declare const Text: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & {
1561
- [x: string]: unknown;
1562
- };
1645
+ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, "key" | "disabled" | keyof react.HTMLAttributes<HTMLDivElement> | "align" | "ellipsis" | "inline" | "colorScheme" | "variant" | "prominence" | "renderAs" | "preventUserSelect"> & {
1646
+ renderAs?: any;
1647
+ } & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1648
+ /**
1649
+ * The horizontal alignment
1650
+ * <br />
1651
+ * _Note: this only affects block elements_
1652
+ */
1653
+ align?: AlignmentTypes;
1654
+ /**
1655
+ * The text content
1656
+ */
1657
+ children?: ReactNode | undefined;
1658
+ /**
1659
+ * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1660
+ */
1661
+ colorScheme?: ColorSchemeTypes;
1662
+ /**
1663
+ * Allows user to override default button colors
1664
+ */
1665
+ disabled?: boolean;
1666
+ /**
1667
+ * Attempt to keep the text to a single line by truncating with an ellipsis
1668
+ * <br />
1669
+ * _Note: this only affects block elements_
1670
+ */
1671
+ ellipsis?: boolean;
1672
+ /**
1673
+ * Display the text as inline content
1674
+ */
1675
+ inline?: boolean;
1676
+ /**
1677
+ * Prevents text from being highlighted and copied
1678
+ */
1679
+ preventUserSelect?: boolean;
1680
+ /**
1681
+ * Text prominence affects color. Use 'primary' for main non-interactive text, 'secondary' for supporting text, and 'button' in specific cases where text is used in an interactive component.
1682
+ */
1683
+ prominence?: "button" | "primary" | "secondary";
1684
+ /**
1685
+ * This will inherit the jsdoc block from PolymorphicComponent
1686
+ */
1687
+ renderAs?: ElementType$1;
1688
+ /**
1689
+ * The text style to display
1690
+ */
1691
+ variant?: keyof typeof variantStyleMap | undefined;
1692
+ } & {
1693
+ ref?: any;
1694
+ }) | (Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1695
+ /**
1696
+ * The horizontal alignment
1697
+ * <br />
1698
+ * _Note: this only affects block elements_
1699
+ */
1700
+ align?: AlignmentTypes;
1701
+ /**
1702
+ * The text content
1703
+ */
1704
+ children?: ReactNode | undefined;
1705
+ /**
1706
+ * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1707
+ */
1708
+ colorScheme?: ColorSchemeTypes;
1709
+ /**
1710
+ * Allows user to override default button colors
1711
+ */
1712
+ disabled?: boolean;
1713
+ /**
1714
+ * Attempt to keep the text to a single line by truncating with an ellipsis
1715
+ * <br />
1716
+ * _Note: this only affects block elements_
1717
+ */
1718
+ ellipsis?: boolean;
1719
+ /**
1720
+ * Display the text as inline content
1721
+ */
1722
+ inline?: boolean;
1723
+ /**
1724
+ * Prevents text from being highlighted and copied
1725
+ */
1726
+ preventUserSelect?: boolean;
1727
+ /**
1728
+ * Text prominence affects color. Use 'primary' for main non-interactive text, 'secondary' for supporting text, and 'button' in specific cases where text is used in an interactive component.
1729
+ */
1730
+ prominence?: "button" | "primary" | "secondary";
1731
+ /**
1732
+ * This will inherit the jsdoc block from PolymorphicComponent
1733
+ */
1734
+ renderAs?: ElementType$1;
1735
+ /**
1736
+ * The text style to display
1737
+ */
1738
+ variant?: keyof typeof variantStyleMap | undefined;
1739
+ } & {
1740
+ renderAs: keyof react.JSX.IntrinsicElements | react.JSXElementConstructor<any>;
1741
+ })>, never> & Record<string, never>;
1563
1742
 
1564
1743
  type MenuItemLabelProps = {
1565
1744
  /**
@@ -1927,15 +2106,19 @@ type StackProps = {
1927
2106
  * The default behavior is `vertical`. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
1928
2107
  */
1929
2108
  direction?: 'horizontal' | 'vertical';
1930
- renderAs?: ElementType;
2109
+ renderAs?: ElementType$1;
1931
2110
  };
1932
2111
  /**
1933
2112
  * Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
1934
2113
  * This allows for layouting children in a consistent way without needing to manually add margins or padding.
1935
2114
  */
1936
- declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement | null) & {
1937
- [x: string]: unknown;
1938
- };
2115
+ declare const Stack: (<C = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, keyof StackProps> & {
2116
+ renderAs?: any;
2117
+ } & StackProps & {
2118
+ ref?: any;
2119
+ }) | (StackProps & {
2120
+ renderAs: keyof react.JSX.IntrinsicElements | react.JSXElementConstructor<any>;
2121
+ })>, never> & Record<string, never>;
1939
2122
 
1940
2123
  type TagProps = ComponentPropsWithoutRef<'div'> & {
1941
2124
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, ForwardedRef, Ref, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
3
+ import { ReactNode, Dispatch, SetStateAction, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ChangeEvent, ForwardedRef, Ref, JSXElementConstructor, ElementType as ElementType$1, InputHTMLAttributes, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
4
4
  import { LinkProps as LinkProps$1 } from 'react-router-dom';
5
5
  import * as styled_components from 'styled-components';
6
6
  import { DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuCheckboxItemProps } from '@radix-ui/react-dropdown-menu';
@@ -414,20 +414,6 @@ declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
414
414
  label: string;
415
415
  } & react.RefAttributes<HTMLDivElement>>;
416
416
 
417
- type UnknownRecord = Record<string, unknown>;
418
- type PropsOf<Component extends ElementType> = ComponentPropsWithoutRef<Component>;
419
- type ExtendedProps<Props = UnknownRecord, OverrideProps = UnknownRecord> = Omit<Props, keyof OverrideProps> & OverrideProps;
420
- type ComponentProp<Component extends ElementType> = {
421
- renderAs?: Component;
422
- };
423
- /**
424
- * extend the polymorphic component props to always include children
425
- */
426
- type PolymorphicComponentProps<Component extends ElementType, Props = UnknownRecord> = ExtendedProps<PropsOf<Component>, ComponentProp<Component> & Props> & {
427
- children?: ReactNode;
428
- ref?: ComponentPropsWithRef<Component>['ref'];
429
- };
430
-
431
417
  type Spacings = 'space-01' | 'space-02' | 'space-03' | 'space-04' | 'space-05' | 'space-06' | 'space-07' | 'space-08' | 'space-09';
432
418
 
433
419
  type JustifyContentType = 'center' | 'flex-end' | 'flex-start' | 'space-around' | 'space-between' | 'space-evenly';
@@ -440,7 +426,6 @@ type Gap = {
440
426
  column: Spacings;
441
427
  row: Spacings;
442
428
  };
443
- declare const DEFAULT_ELEMENT$1 = "div";
444
429
  /**
445
430
  * CSS property => Box prop:
446
431
  * flex-direction => direction
@@ -451,7 +436,7 @@ declare const DEFAULT_ELEMENT$1 = "div";
451
436
  * gap => gap
452
437
  * display: inline-flex => inline
453
438
  */
454
- type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
439
+ type BoxProps = ComponentPropsWithoutRef<'div'> & {
455
440
  /**
456
441
  * Specifies how the browser distributes space between and around
457
442
  * items along the cross-axis of their container; has no effect on
@@ -528,7 +513,6 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
528
513
  * *Note: only works for nested `<Box />`*
529
514
  */
530
515
  order?: number | 'inherit' | 'initial' | 'unset';
531
- renderAs?: ElementType;
532
516
  /**
533
517
  * Specifies how items will shrink inside the container when the default size of
534
518
  * items is larger than their container
@@ -544,8 +528,9 @@ type BoxProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT$1> & {
544
528
  /**
545
529
  * Box is a layout container using [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox).
546
530
  */
547
- declare const Box: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, BoxProps>) => react.ReactElement | null) & {
548
- [x: string]: unknown;
531
+ declare const Box: {
532
+ ({ alignContent, alignItems, alignSelf, basis, children, direction, fill, fillViewport, gap, grow, hasBoxParent, inline, justifyContent, order, shrink, wrapItems, ...otherProps }: BoxProps): JSX.Element;
533
+ displayName: string;
549
534
  };
550
535
 
551
536
  type BreadcrumbsProps = ComponentPropsWithoutRef<'div'> & {
@@ -908,6 +893,26 @@ declare const CheckboxGroup: {
908
893
  displayName: string;
909
894
  };
910
895
 
896
+ type ExtendedProps<Props = Record<string, unknown>, OverrideProps = Record<string, unknown>> = Omit<Props, keyof OverrideProps> & OverrideProps;
897
+ type ElementType = JSXElementConstructor<any> | keyof JSX.IntrinsicElements;
898
+ type PropsOf<C extends ElementType> = JSX.LibraryManagedAttributes<C, ComponentPropsWithoutRef<C>>;
899
+ type ComponentProp<C> = {
900
+ /**
901
+ * Render a different element or component
902
+ *
903
+ * @type ElementType | ComponentType
904
+ * @default 'div'
905
+ */
906
+ renderAs?: C;
907
+ };
908
+ type InheritedProps<C extends ElementType, Props = Record<string, unknown>> = ExtendedProps<PropsOf<C>, Props>;
909
+ type PolymorphicRef<C> = C extends ElementType ? ComponentPropsWithRef<C>['ref'] : never;
910
+ type PolymorphicComponentProps<C, Props = Record<string, unknown>> = C extends ElementType ? InheritedProps<C, ComponentProp<C> & Props> & {
911
+ ref?: PolymorphicRef<C>;
912
+ } : Props & {
913
+ renderAs: ElementType;
914
+ };
915
+
911
916
  type AlignmentTypes$1 = 'center' | 'justify' | 'left' | 'right';
912
917
  declare const variantStyleMap$1: {
913
918
  hero: styled_components.FlattenSimpleInterpolation;
@@ -952,7 +957,7 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
952
957
  * Prevents text from being highlighted and copied
953
958
  */
954
959
  preventUserSelect?: boolean;
955
- renderAs?: ElementType;
960
+ renderAs?: ElementType$1;
956
961
  /**
957
962
  * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
958
963
  */
@@ -961,9 +966,89 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
961
966
  /**
962
967
  * Displaying heading text, both visually and semantically
963
968
  */
964
- declare const Heading: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement | null) & {
965
- [x: string]: unknown;
966
- };
969
+ declare const Heading: (<C = "h1">(props: PolymorphicComponentProps<C, HeadingProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, "key" | "disabled" | keyof react.HTMLAttributes<HTMLHeadingElement> | "align" | "ellipsis" | "inline" | "colorScheme" | "variant" | "renderAs" | "preventUserSelect"> & {
970
+ renderAs?: any;
971
+ } & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
972
+ /**
973
+ * The horizontal alignment
974
+ * <br />
975
+ * _Note: this only affects block elements_
976
+ */
977
+ align?: AlignmentTypes$1;
978
+ /**
979
+ * The content of the heading
980
+ */
981
+ children: ReactNode;
982
+ /**
983
+ * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
984
+ */
985
+ colorScheme?: ColorSchemeTypes;
986
+ /**
987
+ * Styles to text as disabled
988
+ */
989
+ disabled?: boolean;
990
+ /**
991
+ * Attempt to keep the text to a single line by truncating with an ellipsis
992
+ * <br />
993
+ * _Note: this only affects block elements_
994
+ */
995
+ ellipsis?: boolean;
996
+ /**
997
+ * Display the text as inline content
998
+ */
999
+ inline?: boolean;
1000
+ /**
1001
+ * Prevents text from being highlighted and copied
1002
+ */
1003
+ preventUserSelect?: boolean;
1004
+ renderAs?: ElementType$1;
1005
+ /**
1006
+ * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
1007
+ */
1008
+ variant?: keyof typeof variantStyleMap$1;
1009
+ } & {
1010
+ ref?: any;
1011
+ }) | (Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
1012
+ /**
1013
+ * The horizontal alignment
1014
+ * <br />
1015
+ * _Note: this only affects block elements_
1016
+ */
1017
+ align?: AlignmentTypes$1;
1018
+ /**
1019
+ * The content of the heading
1020
+ */
1021
+ children: ReactNode;
1022
+ /**
1023
+ * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1024
+ */
1025
+ colorScheme?: ColorSchemeTypes;
1026
+ /**
1027
+ * Styles to text as disabled
1028
+ */
1029
+ disabled?: boolean;
1030
+ /**
1031
+ * Attempt to keep the text to a single line by truncating with an ellipsis
1032
+ * <br />
1033
+ * _Note: this only affects block elements_
1034
+ */
1035
+ ellipsis?: boolean;
1036
+ /**
1037
+ * Display the text as inline content
1038
+ */
1039
+ inline?: boolean;
1040
+ /**
1041
+ * Prevents text from being highlighted and copied
1042
+ */
1043
+ preventUserSelect?: boolean;
1044
+ renderAs?: ElementType$1;
1045
+ /**
1046
+ * The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
1047
+ */
1048
+ variant?: keyof typeof variantStyleMap$1;
1049
+ } & {
1050
+ renderAs: keyof react.JSX.IntrinsicElements | react.JSXElementConstructor<any>;
1051
+ })>, never> & Record<string, never>;
967
1052
 
968
1053
  declare const iconMap: {
969
1054
  'ab-test': (props: react.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
@@ -1548,7 +1633,7 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
1548
1633
  /**
1549
1634
  * This will inherit the jsdoc block from PolymorphicComponent
1550
1635
  */
1551
- renderAs?: ElementType;
1636
+ renderAs?: ElementType$1;
1552
1637
  /**
1553
1638
  * The text style to display
1554
1639
  */
@@ -1557,9 +1642,103 @@ type TextProps = ComponentPropsWithoutRef<'div'> & {
1557
1642
  /**
1558
1643
  * Used for rending paragraphs and inline text.
1559
1644
  */
1560
- declare const Text: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & {
1561
- [x: string]: unknown;
1562
- };
1645
+ declare const Text: (<C = "div">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, "key" | "disabled" | keyof react.HTMLAttributes<HTMLDivElement> | "align" | "ellipsis" | "inline" | "colorScheme" | "variant" | "prominence" | "renderAs" | "preventUserSelect"> & {
1646
+ renderAs?: any;
1647
+ } & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1648
+ /**
1649
+ * The horizontal alignment
1650
+ * <br />
1651
+ * _Note: this only affects block elements_
1652
+ */
1653
+ align?: AlignmentTypes;
1654
+ /**
1655
+ * The text content
1656
+ */
1657
+ children?: ReactNode | undefined;
1658
+ /**
1659
+ * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1660
+ */
1661
+ colorScheme?: ColorSchemeTypes;
1662
+ /**
1663
+ * Allows user to override default button colors
1664
+ */
1665
+ disabled?: boolean;
1666
+ /**
1667
+ * Attempt to keep the text to a single line by truncating with an ellipsis
1668
+ * <br />
1669
+ * _Note: this only affects block elements_
1670
+ */
1671
+ ellipsis?: boolean;
1672
+ /**
1673
+ * Display the text as inline content
1674
+ */
1675
+ inline?: boolean;
1676
+ /**
1677
+ * Prevents text from being highlighted and copied
1678
+ */
1679
+ preventUserSelect?: boolean;
1680
+ /**
1681
+ * Text prominence affects color. Use 'primary' for main non-interactive text, 'secondary' for supporting text, and 'button' in specific cases where text is used in an interactive component.
1682
+ */
1683
+ prominence?: "button" | "primary" | "secondary";
1684
+ /**
1685
+ * This will inherit the jsdoc block from PolymorphicComponent
1686
+ */
1687
+ renderAs?: ElementType$1;
1688
+ /**
1689
+ * The text style to display
1690
+ */
1691
+ variant?: keyof typeof variantStyleMap | undefined;
1692
+ } & {
1693
+ ref?: any;
1694
+ }) | (Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1695
+ /**
1696
+ * The horizontal alignment
1697
+ * <br />
1698
+ * _Note: this only affects block elements_
1699
+ */
1700
+ align?: AlignmentTypes;
1701
+ /**
1702
+ * The text content
1703
+ */
1704
+ children?: ReactNode | undefined;
1705
+ /**
1706
+ * Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
1707
+ */
1708
+ colorScheme?: ColorSchemeTypes;
1709
+ /**
1710
+ * Allows user to override default button colors
1711
+ */
1712
+ disabled?: boolean;
1713
+ /**
1714
+ * Attempt to keep the text to a single line by truncating with an ellipsis
1715
+ * <br />
1716
+ * _Note: this only affects block elements_
1717
+ */
1718
+ ellipsis?: boolean;
1719
+ /**
1720
+ * Display the text as inline content
1721
+ */
1722
+ inline?: boolean;
1723
+ /**
1724
+ * Prevents text from being highlighted and copied
1725
+ */
1726
+ preventUserSelect?: boolean;
1727
+ /**
1728
+ * Text prominence affects color. Use 'primary' for main non-interactive text, 'secondary' for supporting text, and 'button' in specific cases where text is used in an interactive component.
1729
+ */
1730
+ prominence?: "button" | "primary" | "secondary";
1731
+ /**
1732
+ * This will inherit the jsdoc block from PolymorphicComponent
1733
+ */
1734
+ renderAs?: ElementType$1;
1735
+ /**
1736
+ * The text style to display
1737
+ */
1738
+ variant?: keyof typeof variantStyleMap | undefined;
1739
+ } & {
1740
+ renderAs: keyof react.JSX.IntrinsicElements | react.JSXElementConstructor<any>;
1741
+ })>, never> & Record<string, never>;
1563
1742
 
1564
1743
  type MenuItemLabelProps = {
1565
1744
  /**
@@ -1927,15 +2106,19 @@ type StackProps = {
1927
2106
  * The default behavior is `vertical`. Can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
1928
2107
  */
1929
2108
  direction?: 'horizontal' | 'vertical';
1930
- renderAs?: ElementType;
2109
+ renderAs?: ElementType$1;
1931
2110
  };
1932
2111
  /**
1933
2112
  * Used to layout its children in a vertical or horizontal stack. The gap between each item in the stack can be customized.
1934
2113
  * This allows for layouting children in a consistent way without needing to manually add margins or padding.
1935
2114
  */
1936
- declare const Stack: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement | null) & {
1937
- [x: string]: unknown;
1938
- };
2115
+ declare const Stack: (<C = "div">(props: PolymorphicComponentProps<C, StackProps>) => react.ReactElement) & Omit<react.FunctionComponent<(Omit<Omit<any, "ref">, keyof StackProps> & {
2116
+ renderAs?: any;
2117
+ } & StackProps & {
2118
+ ref?: any;
2119
+ }) | (StackProps & {
2120
+ renderAs: keyof react.JSX.IntrinsicElements | react.JSXElementConstructor<any>;
2121
+ })>, never> & Record<string, never>;
1939
2122
 
1940
2123
  type TagProps = ComponentPropsWithoutRef<'div'> & {
1941
2124
  /**