@wistia/ui 0.14.26 → 0.14.27-beta.00a6ea3c.ab8f0ad
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.cjs +4702 -4594
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +832 -825
- package/dist/index.d.ts +832 -825
- package/dist/index.mjs +4822 -4709
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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 react__default, { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, PropsWithChildren, Ref, SyntheticEvent,
|
|
3
|
+
import react__default, { ReactNode, LegacyRef, MutableRefObject, RefCallback, Dispatch, SetStateAction, RefObject, ComponentPropsWithoutRef, JSX, ComponentPropsWithRef, MouseEvent, ElementType, ChangeEvent, PropsWithChildren, ReactElement, InputHTMLAttributes, Ref, SyntheticEvent, HTMLAttributes, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
4
|
import { UseFilePickerConfig, FilePickerReturnTypes, ExtractContentTypeFromConfig, useImperativeFilePickerConfig, ImperativeFilePickerReturnTypes } from 'use-file-picker/types';
|
|
5
5
|
export * from 'use-file-picker/types';
|
|
6
6
|
import * as react_router from 'react-router';
|
|
@@ -1601,6 +1601,27 @@ type ComboboxProps = {
|
|
|
1601
1601
|
};
|
|
1602
1602
|
declare const Combobox: ({ placeholder, value, onChange, searchValue, onSearchValueChange, children, fullWidth, }: ComboboxProps) => react_jsx_runtime.JSX.Element;
|
|
1603
1603
|
|
|
1604
|
+
type ContextMenuProps = {
|
|
1605
|
+
children: ReactNode;
|
|
1606
|
+
onRequestClose?: () => void;
|
|
1607
|
+
} & ({
|
|
1608
|
+
position: {
|
|
1609
|
+
x: number;
|
|
1610
|
+
y: number;
|
|
1611
|
+
};
|
|
1612
|
+
triggerRef?: never;
|
|
1613
|
+
} | {
|
|
1614
|
+
position?: never;
|
|
1615
|
+
triggerRef: RefObject<HTMLElement>;
|
|
1616
|
+
});
|
|
1617
|
+
/**
|
|
1618
|
+
* The ContextMenu is an extended implementation of the [Menu]() component that allows for right-click context menus.
|
|
1619
|
+
* It can be used in two ways:
|
|
1620
|
+
* 1. By providing a `triggerRef`, which will render the menu when the referenced element is right-clicked.
|
|
1621
|
+
* 2. By providing a `position` prop, which will render the menu at the specified coordinates.
|
|
1622
|
+
*/
|
|
1623
|
+
declare const ContextMenu: ({ position, triggerRef, children, onRequestClose, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
|
|
1624
|
+
|
|
1604
1625
|
type DataCardProps = ComponentPropsWithoutRef<'div'> & Partial<Pick<ButtonAsLinkProps, 'beforeAction' | 'disabled' | 'href' | 'onClick' | 'type'>> & {
|
|
1605
1626
|
/**
|
|
1606
1627
|
* Label text displayed above the value
|
|
@@ -1683,6 +1704,129 @@ declare const DataCardHoverArrow: {
|
|
|
1683
1704
|
displayName: string;
|
|
1684
1705
|
};
|
|
1685
1706
|
|
|
1707
|
+
type DataListProps = ComponentPropsWithoutRef<'dl'> & {
|
|
1708
|
+
/**
|
|
1709
|
+
* Should only contain `DataListItem` components.
|
|
1710
|
+
*/
|
|
1711
|
+
children: ReactNode;
|
|
1712
|
+
/**
|
|
1713
|
+
* Maximum width for the label.
|
|
1714
|
+
*/
|
|
1715
|
+
labelMaxWith?: string;
|
|
1716
|
+
/**
|
|
1717
|
+
* Prominence of the label text. Default is `primary`.
|
|
1718
|
+
*/
|
|
1719
|
+
labelProminence?: 'primary' | 'secondary';
|
|
1720
|
+
/**
|
|
1721
|
+
* Alignment of the value text. Default is `start`.
|
|
1722
|
+
*/
|
|
1723
|
+
valueAlignment?: 'end' | 'start';
|
|
1724
|
+
};
|
|
1725
|
+
/**
|
|
1726
|
+
* The DataList component is used to display a list of items with labels and values.
|
|
1727
|
+
*/
|
|
1728
|
+
declare const DataList: {
|
|
1729
|
+
({ children, valueAlignment, labelMaxWith, labelProminence, ...props }: DataListProps): JSX.Element;
|
|
1730
|
+
displayName: string;
|
|
1731
|
+
};
|
|
1732
|
+
|
|
1733
|
+
type DataListItemProps = Omit<ComponentPropsWithoutRef<'dl'>, 'children'> & {
|
|
1734
|
+
/**
|
|
1735
|
+
* Should only contain `DataListItemLabel` and `DataListItemValue` components.
|
|
1736
|
+
*/
|
|
1737
|
+
children: ReactNode;
|
|
1738
|
+
};
|
|
1739
|
+
/**
|
|
1740
|
+
* An item within a `DataList`. It should only contain `DataListItemLabel` and `DataListItemValue` components.
|
|
1741
|
+
*/
|
|
1742
|
+
declare const DataListItem: {
|
|
1743
|
+
({ children }: DataListItemProps): ReactNode;
|
|
1744
|
+
displayName: string;
|
|
1745
|
+
};
|
|
1746
|
+
|
|
1747
|
+
type AlignmentTypes$1 = 'center' | 'justify' | 'left' | 'right';
|
|
1748
|
+
declare const variantStyleMap$1: {
|
|
1749
|
+
body1: styled_components.FlattenSimpleInterpolation;
|
|
1750
|
+
body2: styled_components.FlattenSimpleInterpolation;
|
|
1751
|
+
body3: styled_components.FlattenSimpleInterpolation;
|
|
1752
|
+
body4: styled_components.FlattenSimpleInterpolation;
|
|
1753
|
+
body1Mono: styled_components.FlattenSimpleInterpolation;
|
|
1754
|
+
body2Mono: styled_components.FlattenSimpleInterpolation;
|
|
1755
|
+
body3Mono: styled_components.FlattenSimpleInterpolation;
|
|
1756
|
+
body4Mono: styled_components.FlattenSimpleInterpolation;
|
|
1757
|
+
label1: styled_components.FlattenSimpleInterpolation;
|
|
1758
|
+
label2: styled_components.FlattenSimpleInterpolation;
|
|
1759
|
+
label3: styled_components.FlattenSimpleInterpolation;
|
|
1760
|
+
label4: styled_components.FlattenSimpleInterpolation;
|
|
1761
|
+
};
|
|
1762
|
+
type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
1763
|
+
/**
|
|
1764
|
+
* The horizontal alignment
|
|
1765
|
+
* <br />
|
|
1766
|
+
* _Note: this only affects block elements_
|
|
1767
|
+
*/
|
|
1768
|
+
align?: AlignmentTypes$1;
|
|
1769
|
+
/**
|
|
1770
|
+
* The text content
|
|
1771
|
+
*/
|
|
1772
|
+
children?: ReactNode | undefined;
|
|
1773
|
+
/**
|
|
1774
|
+
* Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
|
|
1775
|
+
*/
|
|
1776
|
+
colorScheme?: ColorSchemeTypes;
|
|
1777
|
+
/**
|
|
1778
|
+
* Allows user to override default button colors
|
|
1779
|
+
*/
|
|
1780
|
+
disabled?: boolean;
|
|
1781
|
+
/**
|
|
1782
|
+
* Display the text as inline content
|
|
1783
|
+
*/
|
|
1784
|
+
inline?: boolean;
|
|
1785
|
+
/**
|
|
1786
|
+
* Prevents text from being highlighted and copied
|
|
1787
|
+
*/
|
|
1788
|
+
preventUserSelect?: boolean;
|
|
1789
|
+
/**
|
|
1790
|
+
* 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.
|
|
1791
|
+
*/
|
|
1792
|
+
prominence?: 'button' | 'primary' | 'secondary';
|
|
1793
|
+
/**
|
|
1794
|
+
* This will inherit the jsdoc block from PolymorphicComponent
|
|
1795
|
+
*/
|
|
1796
|
+
renderAs?: ElementType;
|
|
1797
|
+
/**
|
|
1798
|
+
* Number of lines to display before truncating with an ellipsis.
|
|
1799
|
+
* Set to 1 to truncate after a single line, 2 for two lines, etc.
|
|
1800
|
+
* <br />
|
|
1801
|
+
* _Note: this only affects block elements_
|
|
1802
|
+
*/
|
|
1803
|
+
truncate?: number;
|
|
1804
|
+
/**
|
|
1805
|
+
* The text style to display
|
|
1806
|
+
*/
|
|
1807
|
+
variant?: keyof typeof variantStyleMap$1 | undefined;
|
|
1808
|
+
};
|
|
1809
|
+
/**
|
|
1810
|
+
* Used for rending paragraphs and inline text.
|
|
1811
|
+
*/
|
|
1812
|
+
declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
|
|
1813
|
+
|
|
1814
|
+
/**
|
|
1815
|
+
* The label of the `DataListItem`. Extends the [Text]() component.
|
|
1816
|
+
*/
|
|
1817
|
+
declare const DataListItemLabel: {
|
|
1818
|
+
(props: TextProps): JSX.Element;
|
|
1819
|
+
displayName: string;
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* The value of the `DataListItem`. Extends the [Text]() component.
|
|
1824
|
+
*/
|
|
1825
|
+
declare const DataListItemValue: {
|
|
1826
|
+
(props: TextProps): JSX.Element;
|
|
1827
|
+
displayName: string;
|
|
1828
|
+
};
|
|
1829
|
+
|
|
1686
1830
|
type DividerProps = ComponentPropsWithoutRef<'div'> & {
|
|
1687
1831
|
/**
|
|
1688
1832
|
* Orientation of the divider.
|
|
@@ -1697,8 +1841,8 @@ declare const Divider: {
|
|
|
1697
1841
|
displayName: string;
|
|
1698
1842
|
};
|
|
1699
1843
|
|
|
1700
|
-
type AlignmentTypes
|
|
1701
|
-
declare const variantStyleMap
|
|
1844
|
+
type AlignmentTypes = 'center' | 'justify' | 'left' | 'right';
|
|
1845
|
+
declare const variantStyleMap: {
|
|
1702
1846
|
hero: styled_components.FlattenSimpleInterpolation;
|
|
1703
1847
|
heading1: styled_components.FlattenSimpleInterpolation;
|
|
1704
1848
|
heading2: styled_components.FlattenSimpleInterpolation;
|
|
@@ -1714,7 +1858,7 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
|
|
|
1714
1858
|
* <br />
|
|
1715
1859
|
* _Note: this only affects block elements_
|
|
1716
1860
|
*/
|
|
1717
|
-
align?: AlignmentTypes
|
|
1861
|
+
align?: AlignmentTypes;
|
|
1718
1862
|
/**
|
|
1719
1863
|
* The content of the heading
|
|
1720
1864
|
*/
|
|
@@ -1750,7 +1894,7 @@ type HeadingProps = ComponentPropsWithoutRef<typeof DEFAULT_ELEMENT> & {
|
|
|
1750
1894
|
/**
|
|
1751
1895
|
* The text style to display. This will also affect what element (h1, h2, etc) is rendered, unless the `renderAs` prop is used
|
|
1752
1896
|
*/
|
|
1753
|
-
variant?: keyof typeof variantStyleMap
|
|
1897
|
+
variant?: keyof typeof variantStyleMap;
|
|
1754
1898
|
};
|
|
1755
1899
|
/**
|
|
1756
1900
|
* Displaying heading text, both visually and semantically
|
|
@@ -1804,293 +1948,196 @@ type EditableHeadingProps = {
|
|
|
1804
1948
|
*/
|
|
1805
1949
|
declare const EditableHeading: ({ children, onValueChange, onEditingChange, tooltipText, ariaLabel, variant, __forceEditing, editingDisabled, }: EditableHeadingProps) => JSX.Element;
|
|
1806
1950
|
|
|
1807
|
-
|
|
1951
|
+
declare const typographicVariantStyleMap: {
|
|
1952
|
+
hero: styled_components.FlattenSimpleInterpolation;
|
|
1953
|
+
heading1: styled_components.FlattenSimpleInterpolation;
|
|
1954
|
+
heading2: styled_components.FlattenSimpleInterpolation;
|
|
1955
|
+
heading3: styled_components.FlattenSimpleInterpolation;
|
|
1956
|
+
heading4: styled_components.FlattenSimpleInterpolation;
|
|
1957
|
+
heading5: styled_components.FlattenSimpleInterpolation;
|
|
1958
|
+
heading6: styled_components.FlattenSimpleInterpolation;
|
|
1959
|
+
body1: styled_components.FlattenSimpleInterpolation;
|
|
1960
|
+
body2: styled_components.FlattenSimpleInterpolation;
|
|
1961
|
+
body3: styled_components.FlattenSimpleInterpolation;
|
|
1962
|
+
body4: styled_components.FlattenSimpleInterpolation;
|
|
1963
|
+
body1Mono: styled_components.FlattenSimpleInterpolation;
|
|
1964
|
+
body2Mono: styled_components.FlattenSimpleInterpolation;
|
|
1965
|
+
body3Mono: styled_components.FlattenSimpleInterpolation;
|
|
1966
|
+
body4Mono: styled_components.FlattenSimpleInterpolation;
|
|
1967
|
+
label1: styled_components.FlattenSimpleInterpolation;
|
|
1968
|
+
label2: styled_components.FlattenSimpleInterpolation;
|
|
1969
|
+
label3: styled_components.FlattenSimpleInterpolation;
|
|
1970
|
+
label4: styled_components.FlattenSimpleInterpolation;
|
|
1971
|
+
};
|
|
1972
|
+
type TypographicVariant = keyof typeof typographicVariantStyleMap;
|
|
1973
|
+
|
|
1974
|
+
type EditableTextRootProps = Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
|
|
1808
1975
|
/**
|
|
1809
|
-
* The
|
|
1976
|
+
* The children of the editable text root.
|
|
1810
1977
|
*/
|
|
1811
|
-
children
|
|
1978
|
+
children: ReactNode;
|
|
1812
1979
|
/**
|
|
1813
|
-
* The
|
|
1980
|
+
* The initial value for the editable text
|
|
1814
1981
|
*/
|
|
1815
|
-
|
|
1816
|
-
};
|
|
1817
|
-
/**
|
|
1818
|
-
* Truncate text with an ellispsis visble at the end
|
|
1819
|
-
*/
|
|
1820
|
-
declare const Ellipsis: {
|
|
1821
|
-
({ children, lines, ...props }: EllipsisProps): JSX.Element;
|
|
1822
|
-
displayName: string;
|
|
1823
|
-
};
|
|
1824
|
-
|
|
1825
|
-
type ActionCallback<T> = (data: T, nextData: T) => Promise<T> | T;
|
|
1826
|
-
type Action = (data: FormData | null) => Promise<void>;
|
|
1827
|
-
type FormActionState<T> = [{
|
|
1828
|
-
data: T;
|
|
1829
|
-
error: Error | null;
|
|
1830
|
-
}, Action, boolean];
|
|
1831
|
-
declare const useFormState: <T extends object>(action: ActionCallback<T>, initialData?: Partial<T>) => FormActionState<T>;
|
|
1832
|
-
|
|
1833
|
-
type ValidationCallback<T> = (data: T) => FormErrors<T>;
|
|
1834
|
-
type FormWithLabelledByProps = {
|
|
1835
|
-
'aria-label'?: never;
|
|
1982
|
+
defaultValue?: string;
|
|
1836
1983
|
/**
|
|
1837
|
-
* The
|
|
1984
|
+
* The current value for the editable text
|
|
1838
1985
|
*/
|
|
1839
|
-
|
|
1840
|
-
};
|
|
1841
|
-
type FormWithLabelProps = {
|
|
1986
|
+
value?: string;
|
|
1842
1987
|
/**
|
|
1843
|
-
*
|
|
1988
|
+
* Callback fired when the value changes
|
|
1844
1989
|
*/
|
|
1845
|
-
|
|
1846
|
-
'aria-labelledby'?: never;
|
|
1847
|
-
};
|
|
1848
|
-
type FormErrors<T> = Partial<{
|
|
1849
|
-
[K in keyof T]: string[] | string;
|
|
1850
|
-
}>;
|
|
1851
|
-
type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-label' | 'aria-labelledby' | 'children'> & {
|
|
1990
|
+
onValueChange?: (value: string) => void;
|
|
1852
1991
|
/**
|
|
1853
|
-
*
|
|
1992
|
+
* Callback fired when editing is committed (e.g., save button clicked, Enter pressed)
|
|
1854
1993
|
*/
|
|
1855
|
-
|
|
1994
|
+
onValueCommit?: (value: string) => void;
|
|
1856
1995
|
/**
|
|
1857
|
-
*
|
|
1858
|
-
* is set on the `FormField` itself.
|
|
1996
|
+
* Callback fired when editing is cancelled (e.g., cancel button clicked, Escape pressed)
|
|
1859
1997
|
*/
|
|
1860
|
-
|
|
1998
|
+
onValueRevert?: (originalValue: string) => void;
|
|
1861
1999
|
/**
|
|
1862
|
-
*
|
|
2000
|
+
* Callback fired when the editing state changes (editing starts or stops)
|
|
1863
2001
|
*/
|
|
1864
|
-
|
|
2002
|
+
onEditingChange?: (isEditing: boolean) => void;
|
|
1865
2003
|
/**
|
|
1866
|
-
*
|
|
2004
|
+
* The typographic variant to use for the display component
|
|
1867
2005
|
*/
|
|
1868
|
-
|
|
2006
|
+
typographicVariant?: TypographicVariant;
|
|
1869
2007
|
/**
|
|
1870
|
-
*
|
|
2008
|
+
* The action(s) that trigger submit or dismiss in edit mode:
|
|
2009
|
+
* - "enter": Trigger submit when the enter key is pressed, or dismiss when the esc key is pressed
|
|
2010
|
+
* - "blur": Trigger submit when the editable is blurred, or dismiss when the esc key is pressed
|
|
2011
|
+
* - "none": No action will trigger submit or dismiss. You need to use the submit or dismiss buttons
|
|
2012
|
+
* - "both": Pressing Enter and blurring the input will trigger submit, or dismiss when the esc key is pressed
|
|
1871
2013
|
*/
|
|
1872
|
-
|
|
2014
|
+
submitMode?: 'blur' | 'both' | 'enter' | 'none';
|
|
1873
2015
|
/**
|
|
1874
|
-
*
|
|
2016
|
+
* Whether the editable text is read only. If true, the editable text will not be editable and the trigger will not be shown.
|
|
1875
2017
|
*/
|
|
1876
|
-
|
|
2018
|
+
readOnly?: boolean;
|
|
1877
2019
|
/**
|
|
1878
|
-
*
|
|
1879
|
-
*/
|
|
1880
|
-
values?: T;
|
|
1881
|
-
} & (FormWithLabelledByProps | FormWithLabelProps);
|
|
1882
|
-
/**
|
|
1883
|
-
* For creating forms. It provides a context for the form fields to access the form state and validation.
|
|
1884
|
-
* It also provides a way to handle form submission and validation. It is built around [React 19's form APIs](https://react.dev/reference/react-dom/components/form).
|
|
1885
|
-
*/
|
|
1886
|
-
declare const Form: <T>(props: FormProps<T> & {
|
|
1887
|
-
ref?: Ref<HTMLFormElement>;
|
|
1888
|
-
}) => JSX.Element;
|
|
1889
|
-
|
|
1890
|
-
type FormErrorSummaryProps = {
|
|
1891
|
-
description: string;
|
|
1892
|
-
};
|
|
1893
|
-
declare const FormErrorSummary: ({ description }: FormErrorSummaryProps) => react_jsx_runtime.JSX.Element | null;
|
|
1894
|
-
|
|
1895
|
-
type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
|
|
1896
|
-
/**
|
|
1897
|
-
* This should be a single child that is a valid form field (or can pretend to be one).
|
|
1898
|
-
*/
|
|
1899
|
-
children: JSX.Element;
|
|
1900
|
-
/**
|
|
1901
|
-
* Additional descriptive text to display below the form field
|
|
1902
|
-
*/
|
|
1903
|
-
description?: ReactNode;
|
|
1904
|
-
/**
|
|
1905
|
-
* Valid label text
|
|
1906
|
-
*/
|
|
1907
|
-
label: ReactNode;
|
|
1908
|
-
/**
|
|
1909
|
-
* If an id isn't supplied, one is generated internally.
|
|
2020
|
+
* The id of the editable text.
|
|
1910
2021
|
*/
|
|
1911
2022
|
id?: string;
|
|
1912
2023
|
/**
|
|
1913
|
-
*
|
|
1914
|
-
*/
|
|
1915
|
-
error?: ReactNode;
|
|
1916
|
-
/**
|
|
1917
|
-
* The name attribute of the field. It will map to the form data passed into `useFormState`.
|
|
2024
|
+
* The label of the editable text.
|
|
1918
2025
|
*/
|
|
1919
|
-
|
|
2026
|
+
label: string;
|
|
1920
2027
|
/**
|
|
1921
|
-
*
|
|
2028
|
+
* Placeholder text for the input field and display
|
|
1922
2029
|
*/
|
|
1923
|
-
|
|
2030
|
+
placeholder?: string;
|
|
1924
2031
|
/**
|
|
1925
|
-
*
|
|
2032
|
+
* Minimum number of lines to display.
|
|
1926
2033
|
*/
|
|
1927
|
-
|
|
1928
|
-
};
|
|
1929
|
-
/**
|
|
1930
|
-
* FormField is a compound component that combines a label, form control, and optional description and error message.
|
|
1931
|
-
*/
|
|
1932
|
-
declare const FormField: {
|
|
1933
|
-
({ children, description, error, id, label, labelPosition, name, value, ...props }: FormFieldProps): JSX.Element;
|
|
1934
|
-
displayName: string;
|
|
1935
|
-
};
|
|
1936
|
-
|
|
1937
|
-
type FormGroupProps = Omit<ComponentPropsWithoutRef<'fieldset'>, 'onChange'> & {
|
|
1938
|
-
children: ReactNode;
|
|
2034
|
+
minLines?: number;
|
|
1939
2035
|
/**
|
|
1940
|
-
*
|
|
2036
|
+
* Maximum number of lines to display. If not set, there is no maximum.
|
|
1941
2037
|
*/
|
|
1942
|
-
|
|
2038
|
+
maxLines?: number | undefined;
|
|
1943
2039
|
/**
|
|
1944
|
-
* The
|
|
2040
|
+
* The element to receive focus when the editable is closed.
|
|
1945
2041
|
*/
|
|
1946
|
-
|
|
2042
|
+
finalFocusEl?: () => HTMLElement | null;
|
|
1947
2043
|
};
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
(
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
2044
|
+
type EditableTextContextValues = {
|
|
2045
|
+
isEditing: boolean;
|
|
2046
|
+
setIsEditing: (editing: boolean) => void;
|
|
2047
|
+
value: string;
|
|
2048
|
+
setValue: (value: string) => void;
|
|
2049
|
+
originalValue: string;
|
|
2050
|
+
onValueCommit: ((value: string) => void) | undefined;
|
|
2051
|
+
onValueRevert: ((originalValue: string) => void) | undefined;
|
|
2052
|
+
typographicVariant: TypographicVariant;
|
|
2053
|
+
submitMode: 'blur' | 'both' | 'enter' | 'none';
|
|
2054
|
+
readOnly: boolean;
|
|
2055
|
+
id: string;
|
|
2056
|
+
label: string;
|
|
2057
|
+
placeholder: string;
|
|
2058
|
+
minLines: number;
|
|
2059
|
+
maxLines: number | undefined;
|
|
2060
|
+
finalFocusEl: (() => HTMLElement | null) | undefined;
|
|
1960
2061
|
};
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
*/
|
|
1964
|
-
declare const RadioGroup: {
|
|
1965
|
-
({ children, name, onChange, value, ...props }: RadioGroupProps): JSX.Element;
|
|
1966
|
-
displayName: string;
|
|
1967
|
-
};
|
|
2062
|
+
declare const EditableTextContext: react.Context<EditableTextContextValues | null>;
|
|
2063
|
+
declare const EditableTextRoot: ({ children, defaultValue, value: controlledValue, onValueChange, onValueCommit, onValueRevert, onEditingChange, typographicVariant, submitMode, readOnly, id, label, placeholder, minLines, maxLines, finalFocusEl, ...props }: EditableTextRootProps) => JSX.Element;
|
|
1968
2064
|
|
|
1969
|
-
type
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
2065
|
+
type EditableTextProps = Omit<EditableTextRootProps, 'children'> & {
|
|
2066
|
+
/**
|
|
2067
|
+
* Whether to visually hide the label.
|
|
2068
|
+
*/
|
|
2069
|
+
hideLabel?: boolean;
|
|
1973
2070
|
};
|
|
1974
2071
|
/**
|
|
1975
|
-
*
|
|
2072
|
+
* Used for inline editing of text.
|
|
1976
2073
|
*/
|
|
1977
|
-
declare const
|
|
1978
|
-
({
|
|
2074
|
+
declare const EditableText: {
|
|
2075
|
+
({ hideLabel, ...props }: EditableTextProps): JSX.Element;
|
|
1979
2076
|
displayName: string;
|
|
1980
2077
|
};
|
|
1981
2078
|
|
|
1982
|
-
type
|
|
1983
|
-
column: Spacings;
|
|
1984
|
-
row: Spacings;
|
|
1985
|
-
};
|
|
1986
|
-
type ResponsiveGap = ResponsiveObject<Gap | Spacings>;
|
|
1987
|
-
type GridProps = ComponentPropsWithoutRef<'div'> & {
|
|
1988
|
-
/**
|
|
1989
|
-
* The content to be displayed in the grid
|
|
1990
|
-
*/
|
|
1991
|
-
children: ReactNode;
|
|
1992
|
-
/**
|
|
1993
|
-
* When minChildWidth is 'auto', this will be the number of columns, otherwise it will be the maximum number of columns.
|
|
1994
|
-
*/
|
|
1995
|
-
columns?: ResponsiveObject<number | 'auto'> | number | 'auto';
|
|
1996
|
-
/**
|
|
1997
|
-
* Sets the minimum width for each grid item.
|
|
1998
|
-
*/
|
|
1999
|
-
minChildWidth?: ResponsiveObject<number | 'auto'> | number | 'auto';
|
|
2000
|
-
/**
|
|
2001
|
-
* Controls the spacing between grid items.
|
|
2002
|
-
*/
|
|
2003
|
-
gap?: Gap | ResponsiveGap | Spacings;
|
|
2079
|
+
type EditableTextDisplayProps = ComponentPropsWithoutRef<'div'> & {
|
|
2004
2080
|
/**
|
|
2005
|
-
*
|
|
2006
|
-
* When true, items grow to fill space. When false, the grid will auto fill the additional space with empty tracks.
|
|
2081
|
+
* When true, the user can click on the display to edit the text
|
|
2007
2082
|
*/
|
|
2008
|
-
|
|
2083
|
+
asTrigger?: boolean;
|
|
2009
2084
|
renderAs?: ElementType;
|
|
2010
2085
|
};
|
|
2011
|
-
declare const
|
|
2086
|
+
declare const EditableTextDisplay: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, EditableTextDisplayProps>) => react.ReactElement | null) & UnknownRecord;
|
|
2012
2087
|
|
|
2013
|
-
type
|
|
2014
|
-
/**
|
|
2015
|
-
* Accessible text for screen readers.
|
|
2016
|
-
*/
|
|
2017
|
-
label: string;
|
|
2088
|
+
type LabelProps = ComponentPropsWithoutRef<'label'> & {
|
|
2018
2089
|
/**
|
|
2019
|
-
*
|
|
2090
|
+
* Pass an arbitrary child node
|
|
2020
2091
|
*/
|
|
2021
|
-
children
|
|
2022
|
-
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
2023
|
-
/**
|
|
2024
|
-
* IconButton behaves like a [Button](?path=/docs/components-button--docs),
|
|
2025
|
-
* but only accepts an [Icon](?path=/docs/components-icon--docs) as a child.
|
|
2026
|
-
*/
|
|
2027
|
-
declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
2092
|
+
children?: ReactNode;
|
|
2028
2093
|
/**
|
|
2029
|
-
*
|
|
2094
|
+
* To indicate that the label is for a disabled form component
|
|
2030
2095
|
*/
|
|
2031
|
-
|
|
2096
|
+
disabled?: boolean;
|
|
2032
2097
|
/**
|
|
2033
|
-
*
|
|
2098
|
+
* ID of the form component that the label should be associated with
|
|
2034
2099
|
*/
|
|
2035
|
-
|
|
2036
|
-
} & Omit<ButtonAsButtonProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref"> | Omit<{
|
|
2100
|
+
htmlFor?: string | undefined;
|
|
2037
2101
|
/**
|
|
2038
|
-
*
|
|
2102
|
+
* Use if label describes a required form component
|
|
2039
2103
|
*/
|
|
2040
|
-
|
|
2104
|
+
required?: boolean;
|
|
2041
2105
|
/**
|
|
2042
|
-
*
|
|
2106
|
+
* For label text that needs to be available to assistive technology (e.g. screen readers)
|
|
2107
|
+
* but otherwise hidden on screen.
|
|
2043
2108
|
*/
|
|
2044
|
-
|
|
2045
|
-
}
|
|
2109
|
+
screenReaderOnly?: boolean;
|
|
2110
|
+
};
|
|
2111
|
+
/**
|
|
2112
|
+
* Labels are used to give a title to a form component (eg. Input, Select, etc.)
|
|
2113
|
+
*/
|
|
2114
|
+
declare const Label: {
|
|
2115
|
+
({ children, disabled, htmlFor, required, screenReaderOnly, ...props }: LabelProps): JSX.Element;
|
|
2116
|
+
displayName: string;
|
|
2117
|
+
};
|
|
2046
2118
|
|
|
2047
|
-
type
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
borderRadius?: BorderRadius;
|
|
2056
|
-
/**
|
|
2057
|
-
* Specifies whether the width and/or height should fill the container
|
|
2058
|
-
*
|
|
2059
|
-
* *Note: this will override height/width attributes*
|
|
2060
|
-
*/
|
|
2061
|
-
fill?: boolean | 'horizontal' | 'vertical';
|
|
2062
|
-
/**
|
|
2063
|
-
* Specifies how the image's intrinsic size (ie. its natural size) should
|
|
2064
|
-
* be adjusted to fit within its container
|
|
2065
|
-
*/
|
|
2066
|
-
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
2067
|
-
/**
|
|
2068
|
-
* Indicates how the browser should load the image; `eager`loads the image immediately,
|
|
2069
|
-
* `lazy` defers loading the image until it reaches a calculated distance from the viewport.
|
|
2070
|
-
* See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
|
|
2071
|
-
*/
|
|
2072
|
-
loading?: 'eager' | 'lazy';
|
|
2073
|
-
/**
|
|
2074
|
-
* Specifies how the image will align itself in its container
|
|
2075
|
-
*/
|
|
2076
|
-
position?: string;
|
|
2077
|
-
/**
|
|
2078
|
-
* URL to image file
|
|
2079
|
-
*/
|
|
2080
|
-
src: string;
|
|
2119
|
+
type EditableTextLabelProps = Omit<LabelProps, 'disabled' | 'htmlFor' | 'required'>;
|
|
2120
|
+
declare const EditableTextLabel: ({ ...props }: EditableTextLabelProps) => react_jsx_runtime.JSX.Element;
|
|
2121
|
+
|
|
2122
|
+
declare const EditableTextSubmitButton: ({ children, }: {
|
|
2123
|
+
children: ReactElement;
|
|
2124
|
+
}) => JSX.Element | null;
|
|
2125
|
+
|
|
2126
|
+
type EditableTextCancelButtonProps = {
|
|
2081
2127
|
/**
|
|
2082
|
-
* A
|
|
2128
|
+
* A cancel button, typically a [Button]() that will revert the value when clicked.
|
|
2083
2129
|
*/
|
|
2084
|
-
|
|
2130
|
+
children: ReactElement;
|
|
2131
|
+
};
|
|
2132
|
+
declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => React.JSX.Element | null;
|
|
2133
|
+
|
|
2134
|
+
type EditableTextTriggerProps = {
|
|
2085
2135
|
/**
|
|
2086
|
-
* A
|
|
2136
|
+
* A trigger element, typically a [Button]() that will enter editing mode when clicked.
|
|
2087
2137
|
*/
|
|
2088
|
-
|
|
2138
|
+
children: ReactElement;
|
|
2089
2139
|
};
|
|
2090
|
-
declare const
|
|
2091
|
-
({ src, alt, borderRadius, fill: fillContainer, fit: objFit, loading, position: objPosition, onLoad, onError, ...props }: ImageProps): JSX.Element;
|
|
2092
|
-
displayName: string;
|
|
2093
|
-
};
|
|
2140
|
+
declare const EditableTextTrigger: ({ children, ...props }: EditableTextTriggerProps) => JSX.Element | null;
|
|
2094
2141
|
|
|
2095
2142
|
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, 'type'> & {
|
|
2096
2143
|
/**
|
|
@@ -2164,207 +2211,504 @@ declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HT
|
|
|
2164
2211
|
type?: "email" | "multiline" | "number" | "password" | "phone" | "search" | "text" | "url";
|
|
2165
2212
|
} & react.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
2166
2213
|
|
|
2167
|
-
type
|
|
2214
|
+
type EditableTextInputProps = Pick<InputProps, 'autoSelect'>;
|
|
2215
|
+
declare const EditableTextInput: (props: EditableTextInputProps) => JSX.Element | null;
|
|
2216
|
+
|
|
2217
|
+
type EllipsisProps = ComponentPropsWithoutRef<'span'> & {
|
|
2168
2218
|
/**
|
|
2169
|
-
*
|
|
2219
|
+
* The text that will be truncated with an ellipsis
|
|
2170
2220
|
*/
|
|
2171
|
-
|
|
2221
|
+
children?: ReactNode;
|
|
2172
2222
|
/**
|
|
2173
|
-
*
|
|
2223
|
+
* The number that will be truncated with an ellipsis
|
|
2174
2224
|
*/
|
|
2175
|
-
|
|
2176
|
-
/**
|
|
2177
|
-
* the value of what is copied
|
|
2178
|
-
*/
|
|
2179
|
-
value: string;
|
|
2225
|
+
lines?: number | undefined;
|
|
2180
2226
|
};
|
|
2181
2227
|
/**
|
|
2182
|
-
*
|
|
2228
|
+
* Truncate text with an ellispsis visble at the end
|
|
2183
2229
|
*/
|
|
2184
|
-
declare const
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
disabled?: boolean;
|
|
2189
|
-
/**
|
|
2190
|
-
* Callback function that is called when the value is copied to the clipboard
|
|
2191
|
-
*/
|
|
2192
|
-
onCopy?: (value: string) => void;
|
|
2193
|
-
/**
|
|
2194
|
-
* the value of what is copied
|
|
2195
|
-
*/
|
|
2196
|
-
value: string;
|
|
2197
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
2230
|
+
declare const Ellipsis: {
|
|
2231
|
+
({ children, lines, ...props }: EllipsisProps): JSX.Element;
|
|
2232
|
+
displayName: string;
|
|
2233
|
+
};
|
|
2198
2234
|
|
|
2199
|
-
type
|
|
2200
|
-
type
|
|
2201
|
-
type
|
|
2202
|
-
|
|
2203
|
-
|
|
2235
|
+
type ActionCallback<T> = (data: T, nextData: T) => Promise<T> | T;
|
|
2236
|
+
type Action = (data: FormData | null) => Promise<void>;
|
|
2237
|
+
type FormActionState<T> = [{
|
|
2238
|
+
data: T;
|
|
2239
|
+
error: Error | null;
|
|
2240
|
+
}, Action, boolean];
|
|
2241
|
+
declare const useFormState: <T extends object>(action: ActionCallback<T>, initialData?: Partial<T>) => FormActionState<T>;
|
|
2204
2242
|
|
|
2205
|
-
type
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
*/
|
|
2209
|
-
fullWidth?: boolean;
|
|
2210
|
-
/**
|
|
2211
|
-
* @description The keys displayed.
|
|
2212
|
-
*/
|
|
2213
|
-
keyboardKeys: KeyboardKeys | KeyboardKeys[];
|
|
2243
|
+
type ValidationCallback<T> = (data: T) => FormErrors<T>;
|
|
2244
|
+
type FormWithLabelledByProps = {
|
|
2245
|
+
'aria-label'?: never;
|
|
2214
2246
|
/**
|
|
2215
|
-
*
|
|
2247
|
+
* The id of the element that labels the form. Typically a heading.
|
|
2216
2248
|
*/
|
|
2217
|
-
|
|
2249
|
+
'aria-labelledby': string;
|
|
2218
2250
|
};
|
|
2219
|
-
|
|
2220
|
-
({ label, keyboardKeys, fullWidth, ...otherProps }: KeyboardShortcutProps): JSX.Element;
|
|
2221
|
-
displayName: string;
|
|
2222
|
-
};
|
|
2223
|
-
|
|
2224
|
-
type LabelProps = ComponentPropsWithoutRef<'label'> & {
|
|
2251
|
+
type FormWithLabelProps = {
|
|
2225
2252
|
/**
|
|
2226
|
-
*
|
|
2253
|
+
* Accessible name of the form. Use this only when a visible label is not possible. If the form has a title or heading, use `aria-labelledby` instead.
|
|
2227
2254
|
*/
|
|
2228
|
-
|
|
2255
|
+
'aria-label': string;
|
|
2256
|
+
'aria-labelledby'?: never;
|
|
2257
|
+
};
|
|
2258
|
+
type FormErrors<T> = Partial<{
|
|
2259
|
+
[K in keyof T]: string[] | string;
|
|
2260
|
+
}>;
|
|
2261
|
+
type FormProps<T> = Omit<ComponentPropsWithoutRef<'form'>, 'action' | 'aria-label' | 'aria-labelledby' | 'children'> & {
|
|
2229
2262
|
/**
|
|
2230
|
-
*
|
|
2263
|
+
* The action to be performed when the form is submitted. It can be asynchronous.
|
|
2231
2264
|
*/
|
|
2232
|
-
|
|
2265
|
+
action?: Action;
|
|
2233
2266
|
/**
|
|
2234
|
-
*
|
|
2267
|
+
* Sets the default label position for all `FormFields` within the form. Will be ignored if labelPosition
|
|
2268
|
+
* is set on the `FormField` itself.
|
|
2235
2269
|
*/
|
|
2236
|
-
|
|
2270
|
+
labelPosition?: 'block' | 'inline-compact' | 'inline';
|
|
2237
2271
|
/**
|
|
2238
|
-
*
|
|
2272
|
+
* The form elements used in the form
|
|
2239
2273
|
*/
|
|
2240
|
-
|
|
2274
|
+
children: ReactNode;
|
|
2241
2275
|
/**
|
|
2242
|
-
*
|
|
2243
|
-
* but otherwise hidden on screen.
|
|
2276
|
+
* An object that providesd errors for the form fields. This is created by `useFormState` and passed along to `FormField`s.
|
|
2244
2277
|
*/
|
|
2245
|
-
|
|
2246
|
-
};
|
|
2247
|
-
/**
|
|
2248
|
-
* Labels are used to give a title to a form component (eg. Input, Select, etc.)
|
|
2249
|
-
*/
|
|
2250
|
-
declare const Label: {
|
|
2251
|
-
({ children, disabled, htmlFor, required, screenReaderOnly, ...props }: LabelProps): JSX.Element;
|
|
2252
|
-
displayName: string;
|
|
2253
|
-
};
|
|
2254
|
-
|
|
2255
|
-
type VariantType = 'breadcrumbs' | 'bullets' | 'commas' | 'ordered' | 'slashes' | 'spaces' | 'unbulleted';
|
|
2256
|
-
type ItemType = ItemType[] | string[] | string;
|
|
2257
|
-
type ListProps = ComponentPropsWithoutRef<'ul'> & {
|
|
2278
|
+
errors?: FormErrors<T>;
|
|
2258
2279
|
/**
|
|
2259
|
-
*
|
|
2280
|
+
* If true, fills the entire container
|
|
2260
2281
|
*/
|
|
2261
|
-
|
|
2282
|
+
fullWidth?: boolean;
|
|
2262
2283
|
/**
|
|
2263
|
-
*
|
|
2264
|
-
* will be rendered as child `<ListItems>`s. Note that all items will be of the same variant.
|
|
2284
|
+
* The function for handling validation.
|
|
2265
2285
|
*/
|
|
2266
|
-
|
|
2286
|
+
validate?: ValidationCallback<T>;
|
|
2267
2287
|
/**
|
|
2268
|
-
*
|
|
2288
|
+
* An object that provides valuesfor the form fields. This is typically the `state.data` value from `useFormState` and passed along to `FormField`s.
|
|
2269
2289
|
*/
|
|
2270
|
-
|
|
2290
|
+
values?: T;
|
|
2291
|
+
} & (FormWithLabelledByProps | FormWithLabelProps);
|
|
2292
|
+
/**
|
|
2293
|
+
* For creating forms. It provides a context for the form fields to access the form state and validation.
|
|
2294
|
+
* It also provides a way to handle form submission and validation. It is built around [React 19's form APIs](https://react.dev/reference/react-dom/components/form).
|
|
2295
|
+
*/
|
|
2296
|
+
declare const Form: <T>(props: FormProps<T> & {
|
|
2297
|
+
ref?: Ref<HTMLFormElement>;
|
|
2298
|
+
}) => JSX.Element;
|
|
2299
|
+
|
|
2300
|
+
type FormErrorSummaryProps = {
|
|
2301
|
+
description: string;
|
|
2271
2302
|
};
|
|
2272
|
-
declare const
|
|
2273
|
-
({ children, items, variant, ...otherProps }: ListProps): JSX.Element | null;
|
|
2274
|
-
displayName: string;
|
|
2275
|
-
};
|
|
2303
|
+
declare const FormErrorSummary: ({ description }: FormErrorSummaryProps) => react_jsx_runtime.JSX.Element | null;
|
|
2276
2304
|
|
|
2277
|
-
type
|
|
2305
|
+
type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
|
|
2278
2306
|
/**
|
|
2279
|
-
*
|
|
2280
|
-
* Must be used with `onOpenChange`.
|
|
2281
|
-
*/
|
|
2282
|
-
isOpen: boolean;
|
|
2283
|
-
/** When an attempt to toggle the menu is triggered.
|
|
2284
|
-
* Must be used with `isOpen`.
|
|
2307
|
+
* This should be a single child that is a valid form field (or can pretend to be one).
|
|
2285
2308
|
*/
|
|
2286
|
-
|
|
2287
|
-
};
|
|
2288
|
-
type UncontrolledMenuProps = {
|
|
2289
|
-
isOpen?: never;
|
|
2290
|
-
onOpenChange?: never;
|
|
2291
|
-
};
|
|
2292
|
-
type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
|
|
2293
|
-
type MenuProps = MenuControlProps & {
|
|
2309
|
+
children: JSX.Element;
|
|
2294
2310
|
/**
|
|
2295
|
-
*
|
|
2311
|
+
* Additional descriptive text to display below the form field
|
|
2296
2312
|
*/
|
|
2297
|
-
|
|
2313
|
+
description?: ReactNode;
|
|
2298
2314
|
/**
|
|
2299
|
-
*
|
|
2315
|
+
* Valid label text
|
|
2300
2316
|
*/
|
|
2301
|
-
|
|
2317
|
+
label: ReactNode;
|
|
2302
2318
|
/**
|
|
2303
|
-
*
|
|
2304
|
-
* Should be made up of `MenuItem`, `SubMenu`, `Divider`, or other subcomponents listed
|
|
2319
|
+
* If an id isn't supplied, one is generated internally.
|
|
2305
2320
|
*/
|
|
2306
|
-
|
|
2321
|
+
id?: string;
|
|
2307
2322
|
/**
|
|
2308
|
-
*
|
|
2323
|
+
* Will show an error message and put the child input into an invalid state
|
|
2309
2324
|
*/
|
|
2310
|
-
|
|
2325
|
+
error?: ReactNode;
|
|
2311
2326
|
/**
|
|
2312
|
-
*
|
|
2327
|
+
* The name attribute of the field. It will map to the form data passed into `useFormState`.
|
|
2313
2328
|
*/
|
|
2314
|
-
|
|
2329
|
+
name: string;
|
|
2315
2330
|
/**
|
|
2316
|
-
*
|
|
2331
|
+
* A value that overrides the basic value. This should pair with `onChange`.
|
|
2317
2332
|
*/
|
|
2318
|
-
|
|
2333
|
+
value?: string;
|
|
2319
2334
|
/**
|
|
2320
|
-
*
|
|
2335
|
+
* Setting to `inline` will have the label and input appear on the same line. Setting to `block` will have the label above the input.
|
|
2321
2336
|
*/
|
|
2322
|
-
|
|
2337
|
+
labelPosition?: 'block' | 'inline-compact' | 'inline';
|
|
2338
|
+
};
|
|
2339
|
+
/**
|
|
2340
|
+
* FormField is a compound component that combines a label, form control, and optional description and error message.
|
|
2341
|
+
*/
|
|
2342
|
+
declare const FormField: {
|
|
2343
|
+
({ children, description, error, id, label, labelPosition, name, value, ...props }: FormFieldProps): JSX.Element;
|
|
2344
|
+
displayName: string;
|
|
2345
|
+
};
|
|
2346
|
+
|
|
2347
|
+
type FormGroupProps = Omit<ComponentPropsWithoutRef<'fieldset'>, 'onChange'> & {
|
|
2348
|
+
children: ReactNode;
|
|
2323
2349
|
/**
|
|
2324
|
-
*
|
|
2350
|
+
* The label for the form group
|
|
2325
2351
|
*/
|
|
2326
|
-
|
|
2352
|
+
label?: ReactNode;
|
|
2327
2353
|
/**
|
|
2328
|
-
*
|
|
2354
|
+
* The description for the form group
|
|
2329
2355
|
*/
|
|
2330
|
-
|
|
2356
|
+
description?: ReactNode;
|
|
2331
2357
|
};
|
|
2332
2358
|
/**
|
|
2333
|
-
*
|
|
2359
|
+
* For grouping like form elements together.
|
|
2334
2360
|
*/
|
|
2335
|
-
declare const
|
|
2361
|
+
declare const FormGroup: {
|
|
2362
|
+
({ children, label, description, ...props }: FormGroupProps): JSX.Element;
|
|
2363
|
+
displayName: string;
|
|
2364
|
+
};
|
|
2336
2365
|
|
|
2337
|
-
type
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
children: ReactNode | string;
|
|
2366
|
+
type RadioGroupProps = FormGroupProps & {
|
|
2367
|
+
onChange?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
2368
|
+
value?: string | undefined;
|
|
2369
|
+
name: string;
|
|
2342
2370
|
};
|
|
2343
|
-
|
|
2344
|
-
|
|
2371
|
+
/**
|
|
2372
|
+
* For grouping like form elements together. Can serve as a checkbox
|
|
2373
|
+
*/
|
|
2374
|
+
declare const RadioGroup: {
|
|
2375
|
+
({ children, name, onChange, value, ...props }: RadioGroupProps): JSX.Element;
|
|
2345
2376
|
displayName: string;
|
|
2346
2377
|
};
|
|
2347
2378
|
|
|
2348
|
-
type
|
|
2379
|
+
type CheckboxGroupProps = FormGroupProps & {
|
|
2380
|
+
onChange?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
2381
|
+
value?: string[] | undefined;
|
|
2382
|
+
name: string;
|
|
2383
|
+
};
|
|
2384
|
+
/**
|
|
2385
|
+
* For grouping like form elements together. Can serve as a checkbox
|
|
2386
|
+
*/
|
|
2387
|
+
declare const CheckboxGroup: {
|
|
2388
|
+
({ children, name, onChange, value, ...props }: CheckboxGroupProps): JSX.Element;
|
|
2389
|
+
displayName: string;
|
|
2390
|
+
};
|
|
2391
|
+
|
|
2392
|
+
type Gap = {
|
|
2393
|
+
column: Spacings;
|
|
2394
|
+
row: Spacings;
|
|
2395
|
+
};
|
|
2396
|
+
type ResponsiveGap = ResponsiveObject<Gap | Spacings>;
|
|
2397
|
+
type GridProps = ComponentPropsWithoutRef<'div'> & {
|
|
2349
2398
|
/**
|
|
2350
|
-
* The
|
|
2399
|
+
* The content to be displayed in the grid
|
|
2351
2400
|
*/
|
|
2352
|
-
|
|
2401
|
+
children: ReactNode;
|
|
2353
2402
|
/**
|
|
2354
|
-
*
|
|
2403
|
+
* When minChildWidth is 'auto', this will be the number of columns, otherwise it will be the maximum number of columns.
|
|
2355
2404
|
*/
|
|
2356
|
-
|
|
2405
|
+
columns?: ResponsiveObject<number | 'auto'> | number | 'auto';
|
|
2357
2406
|
/**
|
|
2358
|
-
*
|
|
2407
|
+
* Sets the minimum width for each grid item.
|
|
2359
2408
|
*/
|
|
2360
|
-
|
|
2409
|
+
minChildWidth?: ResponsiveObject<number | 'auto'> | number | 'auto';
|
|
2361
2410
|
/**
|
|
2362
|
-
*
|
|
2411
|
+
* Controls the spacing between grid items.
|
|
2363
2412
|
*/
|
|
2364
|
-
|
|
2413
|
+
gap?: Gap | ResponsiveGap | Spacings;
|
|
2365
2414
|
/**
|
|
2366
|
-
*
|
|
2367
|
-
|
|
2415
|
+
* Controls whether grid items expand to fill available space when there are fewer items than columns.
|
|
2416
|
+
* When true, items grow to fill space. When false, the grid will auto fill the additional space with empty tracks.
|
|
2417
|
+
*/
|
|
2418
|
+
expandItems?: boolean;
|
|
2419
|
+
renderAs?: ElementType;
|
|
2420
|
+
};
|
|
2421
|
+
declare const Grid: (<C extends ElementType = "div">(props: PolymorphicComponentProps<C, GridProps>) => react.ReactElement | null) & UnknownRecord;
|
|
2422
|
+
|
|
2423
|
+
type IconButtonProps = {
|
|
2424
|
+
/**
|
|
2425
|
+
* Accessible text for screen readers.
|
|
2426
|
+
*/
|
|
2427
|
+
label: string;
|
|
2428
|
+
/**
|
|
2429
|
+
* The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
|
|
2430
|
+
*/
|
|
2431
|
+
children: JSX.Element;
|
|
2432
|
+
} & (Omit<ButtonAsButtonProps, 'fullWidth' | 'leftIcon' | 'rightIcon'> | Omit<ButtonAsLinkProps, 'fullWidth' | 'leftIcon' | 'rightIcon'>);
|
|
2433
|
+
/**
|
|
2434
|
+
* IconButton behaves like a [Button](?path=/docs/components-button--docs),
|
|
2435
|
+
* but only accepts an [Icon](?path=/docs/components-icon--docs) as a child.
|
|
2436
|
+
*/
|
|
2437
|
+
declare const IconButton: react.ForwardRefExoticComponent<(Omit<{
|
|
2438
|
+
/**
|
|
2439
|
+
* Accessible text for screen readers.
|
|
2440
|
+
*/
|
|
2441
|
+
label: string;
|
|
2442
|
+
/**
|
|
2443
|
+
* The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
|
|
2444
|
+
*/
|
|
2445
|
+
children: JSX.Element;
|
|
2446
|
+
} & Omit<ButtonAsButtonProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref"> | Omit<{
|
|
2447
|
+
/**
|
|
2448
|
+
* Accessible text for screen readers.
|
|
2449
|
+
*/
|
|
2450
|
+
label: string;
|
|
2451
|
+
/**
|
|
2452
|
+
* The [Icon](?path=/docs/components-icon--docs) component to use, e.g. `<Icon type="favorite" />`
|
|
2453
|
+
*/
|
|
2454
|
+
children: JSX.Element;
|
|
2455
|
+
} & Omit<ButtonAsLinkProps, "leftIcon" | "rightIcon" | "fullWidth">, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
2456
|
+
|
|
2457
|
+
type ImageProps = ComponentPropsWithoutRef<'img'> & {
|
|
2458
|
+
/**
|
|
2459
|
+
* Accessible text to apply to the image
|
|
2460
|
+
*/
|
|
2461
|
+
alt: string;
|
|
2462
|
+
/**
|
|
2463
|
+
* Border radius to apply to the image
|
|
2464
|
+
*/
|
|
2465
|
+
borderRadius?: BorderRadius;
|
|
2466
|
+
/**
|
|
2467
|
+
* Specifies whether the width and/or height should fill the container
|
|
2468
|
+
*
|
|
2469
|
+
* *Note: this will override height/width attributes*
|
|
2470
|
+
*/
|
|
2471
|
+
fill?: boolean | 'horizontal' | 'vertical';
|
|
2472
|
+
/**
|
|
2473
|
+
* Specifies how the image's intrinsic size (ie. its natural size) should
|
|
2474
|
+
* be adjusted to fit within its container
|
|
2475
|
+
*/
|
|
2476
|
+
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
2477
|
+
/**
|
|
2478
|
+
* Indicates how the browser should load the image; `eager`loads the image immediately,
|
|
2479
|
+
* `lazy` defers loading the image until it reaches a calculated distance from the viewport.
|
|
2480
|
+
* See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
|
|
2481
|
+
*/
|
|
2482
|
+
loading?: 'eager' | 'lazy';
|
|
2483
|
+
/**
|
|
2484
|
+
* Specifies how the image will align itself in its container
|
|
2485
|
+
*/
|
|
2486
|
+
position?: string;
|
|
2487
|
+
/**
|
|
2488
|
+
* URL to image file
|
|
2489
|
+
*/
|
|
2490
|
+
src: string;
|
|
2491
|
+
/**
|
|
2492
|
+
* A callback that is invoked after the image has loaded
|
|
2493
|
+
*/
|
|
2494
|
+
onLoad?: (event?: SyntheticEvent<HTMLImageElement>) => void;
|
|
2495
|
+
/**
|
|
2496
|
+
* A callback that is invoked after the image has failed to load
|
|
2497
|
+
*/
|
|
2498
|
+
onError?: (event?: SyntheticEvent<HTMLImageElement>) => void;
|
|
2499
|
+
};
|
|
2500
|
+
declare const Image: {
|
|
2501
|
+
({ src, alt, borderRadius, fill: fillContainer, fit: objFit, loading, position: objPosition, onLoad, onError, ...props }: ImageProps): JSX.Element;
|
|
2502
|
+
displayName: string;
|
|
2503
|
+
};
|
|
2504
|
+
|
|
2505
|
+
type InputClickToCopyProps = Omit<InputProps, 'autoSelect' | 'disabled' | 'rightIcon' | 'type' | 'value'> & {
|
|
2506
|
+
/**
|
|
2507
|
+
* When disabled, the copy action will not be triggered
|
|
2508
|
+
*/
|
|
2509
|
+
disabled?: boolean;
|
|
2510
|
+
/**
|
|
2511
|
+
* Callback function that is called when the value is copied to the clipboard
|
|
2512
|
+
*/
|
|
2513
|
+
onCopy?: (value: string) => void;
|
|
2514
|
+
/**
|
|
2515
|
+
* the value of what is copied
|
|
2516
|
+
*/
|
|
2517
|
+
value: string;
|
|
2518
|
+
};
|
|
2519
|
+
/**
|
|
2520
|
+
* Provides a readonly input that copies the text to the clipboard when clicked.
|
|
2521
|
+
*/
|
|
2522
|
+
declare const InputClickToCopy: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "disabled" | "value" | "rightIcon" | "autoSelect"> & {
|
|
2523
|
+
/**
|
|
2524
|
+
* When disabled, the copy action will not be triggered
|
|
2525
|
+
*/
|
|
2526
|
+
disabled?: boolean;
|
|
2527
|
+
/**
|
|
2528
|
+
* Callback function that is called when the value is copied to the clipboard
|
|
2529
|
+
*/
|
|
2530
|
+
onCopy?: (value: string) => void;
|
|
2531
|
+
/**
|
|
2532
|
+
* the value of what is copied
|
|
2533
|
+
*/
|
|
2534
|
+
value: string;
|
|
2535
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
2536
|
+
|
|
2537
|
+
type InputPasswordProps = Omit<InputProps, 'leftIcon' | 'monospace' | 'rightIcon' | 'type'> & {
|
|
2538
|
+
/**
|
|
2539
|
+
* Set the disabled state of the input
|
|
2540
|
+
*/
|
|
2541
|
+
disabled?: boolean;
|
|
2542
|
+
/**
|
|
2543
|
+
* Callback function that is called when the visibility state changes
|
|
2544
|
+
*/
|
|
2545
|
+
onVisibilityToggle?: (isVisible: boolean) => void;
|
|
2546
|
+
};
|
|
2547
|
+
/**
|
|
2548
|
+
* A password input component with a toggle button to show or hide the password text.
|
|
2549
|
+
*/
|
|
2550
|
+
declare const InputPassword: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "monospace" | "leftIcon" | "rightIcon"> & {
|
|
2551
|
+
/**
|
|
2552
|
+
* Set the disabled state of the input
|
|
2553
|
+
*/
|
|
2554
|
+
disabled?: boolean;
|
|
2555
|
+
/**
|
|
2556
|
+
* Callback function that is called when the visibility state changes
|
|
2557
|
+
*/
|
|
2558
|
+
onVisibilityToggle?: (isVisible: boolean) => void;
|
|
2559
|
+
} & react.RefAttributes<HTMLInputElement>>;
|
|
2560
|
+
|
|
2561
|
+
type AlphanumericKeyboardKeys = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
|
|
2562
|
+
type ModifierKeys = 'Alt' | 'Cmd' | 'Ctrl' | 'Meta' | 'Option' | 'Shift';
|
|
2563
|
+
type WhitespaceKeys = 'Enter' | 'Space' | 'Tab';
|
|
2564
|
+
type ArrowKeys = 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp';
|
|
2565
|
+
type KeyboardKeys = AlphanumericKeyboardKeys | ArrowKeys | ModifierKeys | WhitespaceKeys | '?' | 'Backspace' | 'Esc';
|
|
2566
|
+
|
|
2567
|
+
type KeyboardShortcutProps = ComponentPropsWithoutRef<'div'> & {
|
|
2568
|
+
/**
|
|
2569
|
+
* @description If set to true, the keyboard shortcut will stretch the full width of its container.
|
|
2570
|
+
*/
|
|
2571
|
+
fullWidth?: boolean;
|
|
2572
|
+
/**
|
|
2573
|
+
* @description The keys displayed.
|
|
2574
|
+
*/
|
|
2575
|
+
keyboardKeys: KeyboardKeys | KeyboardKeys[];
|
|
2576
|
+
/**
|
|
2577
|
+
* @description A visual label for the keyboard shortcut.
|
|
2578
|
+
*/
|
|
2579
|
+
label?: string;
|
|
2580
|
+
};
|
|
2581
|
+
declare const KeyboardShortcut: {
|
|
2582
|
+
({ label, keyboardKeys, fullWidth, ...otherProps }: KeyboardShortcutProps): JSX.Element;
|
|
2583
|
+
displayName: string;
|
|
2584
|
+
};
|
|
2585
|
+
|
|
2586
|
+
type VariantType = 'breadcrumbs' | 'bullets' | 'commas' | 'ordered' | 'slashes' | 'spaces' | 'unbulleted';
|
|
2587
|
+
type ItemType = ItemType[] | string[] | string;
|
|
2588
|
+
type ListProps = ComponentPropsWithoutRef<'ul'> & {
|
|
2589
|
+
/**
|
|
2590
|
+
* Children should be wrapped in `<ListItem>`
|
|
2591
|
+
*/
|
|
2592
|
+
children?: ReactNode;
|
|
2593
|
+
/**
|
|
2594
|
+
* As an alternative to passing children you can supply an array of strings that
|
|
2595
|
+
* will be rendered as child `<ListItems>`s. Note that all items will be of the same variant.
|
|
2596
|
+
*/
|
|
2597
|
+
items?: ItemType[];
|
|
2598
|
+
/**
|
|
2599
|
+
* The kind of list to render
|
|
2600
|
+
*/
|
|
2601
|
+
variant?: VariantType;
|
|
2602
|
+
};
|
|
2603
|
+
declare const List: {
|
|
2604
|
+
({ children, items, variant, ...otherProps }: ListProps): JSX.Element | null;
|
|
2605
|
+
displayName: string;
|
|
2606
|
+
};
|
|
2607
|
+
|
|
2608
|
+
type MarkProps = ComponentPropsWithoutRef<'div'> & {
|
|
2609
|
+
/** The content of the Mark component. */
|
|
2610
|
+
children: ReactNode;
|
|
2611
|
+
colorScheme?: ColorSchemeTypes;
|
|
2612
|
+
};
|
|
2613
|
+
/**
|
|
2614
|
+
* Defines text that should be marked or highlighted.
|
|
2615
|
+
*/
|
|
2616
|
+
declare const Mark: {
|
|
2617
|
+
({ children, colorScheme, ...props }: MarkProps): JSX.Element;
|
|
2618
|
+
displayName: string;
|
|
2619
|
+
};
|
|
2620
|
+
|
|
2621
|
+
type ControlledMenuProps = {
|
|
2622
|
+
/**
|
|
2623
|
+
* Is the menu open.
|
|
2624
|
+
* Must be used with `onOpenChange`.
|
|
2625
|
+
*/
|
|
2626
|
+
isOpen: boolean;
|
|
2627
|
+
/** When an attempt to toggle the menu is triggered.
|
|
2628
|
+
* Must be used with `isOpen`.
|
|
2629
|
+
*/
|
|
2630
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
2631
|
+
};
|
|
2632
|
+
type UncontrolledMenuProps = {
|
|
2633
|
+
isOpen?: never;
|
|
2634
|
+
onOpenChange?: never;
|
|
2635
|
+
};
|
|
2636
|
+
type MenuControlProps = ControlledMenuProps | UncontrolledMenuProps;
|
|
2637
|
+
type MenuProps = MenuControlProps & {
|
|
2638
|
+
/**
|
|
2639
|
+
* @ignore
|
|
2640
|
+
*/
|
|
2641
|
+
avoidCollisions?: boolean;
|
|
2642
|
+
/**
|
|
2643
|
+
* The position of the Menu
|
|
2644
|
+
*/
|
|
2645
|
+
align?: 'center' | 'end' | 'start';
|
|
2646
|
+
/**
|
|
2647
|
+
* The content of the menu.
|
|
2648
|
+
* Should be made up of `MenuItem`, `SubMenu`, `Divider`, or other subcomponents listed
|
|
2649
|
+
*/
|
|
2650
|
+
children: ReactNode;
|
|
2651
|
+
/**
|
|
2652
|
+
* If the menu is compact
|
|
2653
|
+
*/
|
|
2654
|
+
compact?: boolean;
|
|
2655
|
+
/**
|
|
2656
|
+
* If disabled, the trigger will appear disabled and the menu will not open
|
|
2657
|
+
*/
|
|
2658
|
+
disabled?: boolean;
|
|
2659
|
+
/**
|
|
2660
|
+
* The label for the trigger element, this is ignored if `trigger` is defined
|
|
2661
|
+
*/
|
|
2662
|
+
label?: string;
|
|
2663
|
+
/**
|
|
2664
|
+
* Callback for when the user clicks or focuses outside of the menu
|
|
2665
|
+
*/
|
|
2666
|
+
onInteractOutside?: DropdownMenuContentProps['onInteractOutside'];
|
|
2667
|
+
/**
|
|
2668
|
+
* Replace the default trigger with a custom button or other element
|
|
2669
|
+
*/
|
|
2670
|
+
trigger?: ReactNode;
|
|
2671
|
+
/**
|
|
2672
|
+
* Props to pass to the trigger component, the default trigger is Button
|
|
2673
|
+
*/
|
|
2674
|
+
triggerProps?: Partial<ButtonProps>;
|
|
2675
|
+
};
|
|
2676
|
+
/**
|
|
2677
|
+
* Displays a menu to the users with a set of actions.
|
|
2678
|
+
*/
|
|
2679
|
+
declare const Menu: react.ForwardRefExoticComponent<MenuProps & react.RefAttributes<HTMLButtonElement>>;
|
|
2680
|
+
|
|
2681
|
+
type MenuLabelProps = {
|
|
2682
|
+
/**
|
|
2683
|
+
* The text of the label
|
|
2684
|
+
*/
|
|
2685
|
+
children: ReactNode | string;
|
|
2686
|
+
};
|
|
2687
|
+
declare const MenuLabel: {
|
|
2688
|
+
({ children, ...props }: MenuLabelProps): react_jsx_runtime.JSX.Element;
|
|
2689
|
+
displayName: string;
|
|
2690
|
+
};
|
|
2691
|
+
|
|
2692
|
+
type SubMenuProps = {
|
|
2693
|
+
/**
|
|
2694
|
+
* The label of the submenu
|
|
2695
|
+
*/
|
|
2696
|
+
label: ReactNode;
|
|
2697
|
+
/**
|
|
2698
|
+
* The description of the submenu
|
|
2699
|
+
*/
|
|
2700
|
+
description?: ReactNode;
|
|
2701
|
+
/**
|
|
2702
|
+
* The menu items that will appear in this submenu
|
|
2703
|
+
*/
|
|
2704
|
+
children: ReactNode[];
|
|
2705
|
+
/**
|
|
2706
|
+
* Callback when the submenu is opened or closed
|
|
2707
|
+
*/
|
|
2708
|
+
onOpenChange?: (open: boolean) => void;
|
|
2709
|
+
/**
|
|
2710
|
+
* Icon to display on the left side of the SubMenu, Must be an instance of [Icon](?path=/docs/components-icon--docs)
|
|
2711
|
+
*/
|
|
2368
2712
|
icon?: JSX.Element | undefined;
|
|
2369
2713
|
};
|
|
2370
2714
|
declare const SubMenu: {
|
|
@@ -2515,83 +2859,16 @@ declare const MenuItem: react.ForwardRefExoticComponent<(Omit<DropdownMenuItemPr
|
|
|
2515
2859
|
leftIcon?: ButtonProps["leftIcon"];
|
|
2516
2860
|
rightIcon?: ButtonProps["rightIcon"];
|
|
2517
2861
|
fullWidth?: never;
|
|
2518
|
-
asChild?: never;
|
|
2519
|
-
variant?: never;
|
|
2520
|
-
size?: never;
|
|
2521
|
-
unstyled?: never;
|
|
2522
|
-
} & {
|
|
2523
|
-
/**
|
|
2524
|
-
* Treats the menu item as a link when provided
|
|
2525
|
-
*/
|
|
2526
|
-
href?: MenuItemButtonProps["href"];
|
|
2527
|
-
}, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
2528
|
-
|
|
2529
|
-
type AlignmentTypes = 'center' | 'justify' | 'left' | 'right';
|
|
2530
|
-
declare const variantStyleMap: {
|
|
2531
|
-
body1: styled_components.FlattenSimpleInterpolation;
|
|
2532
|
-
body2: styled_components.FlattenSimpleInterpolation;
|
|
2533
|
-
body3: styled_components.FlattenSimpleInterpolation;
|
|
2534
|
-
body4: styled_components.FlattenSimpleInterpolation;
|
|
2535
|
-
body1Mono: styled_components.FlattenSimpleInterpolation;
|
|
2536
|
-
body2Mono: styled_components.FlattenSimpleInterpolation;
|
|
2537
|
-
body3Mono: styled_components.FlattenSimpleInterpolation;
|
|
2538
|
-
body4Mono: styled_components.FlattenSimpleInterpolation;
|
|
2539
|
-
label1: styled_components.FlattenSimpleInterpolation;
|
|
2540
|
-
label2: styled_components.FlattenSimpleInterpolation;
|
|
2541
|
-
label3: styled_components.FlattenSimpleInterpolation;
|
|
2542
|
-
label4: styled_components.FlattenSimpleInterpolation;
|
|
2543
|
-
};
|
|
2544
|
-
type TextProps = ComponentPropsWithoutRef<'div'> & {
|
|
2545
|
-
/**
|
|
2546
|
-
* The horizontal alignment
|
|
2547
|
-
* <br />
|
|
2548
|
-
* _Note: this only affects block elements_
|
|
2549
|
-
*/
|
|
2550
|
-
align?: AlignmentTypes;
|
|
2551
|
-
/**
|
|
2552
|
-
* The text content
|
|
2553
|
-
*/
|
|
2554
|
-
children?: ReactNode | undefined;
|
|
2555
|
-
/**
|
|
2556
|
-
* Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
|
|
2557
|
-
*/
|
|
2558
|
-
colorScheme?: ColorSchemeTypes;
|
|
2559
|
-
/**
|
|
2560
|
-
* Allows user to override default button colors
|
|
2561
|
-
*/
|
|
2562
|
-
disabled?: boolean;
|
|
2563
|
-
/**
|
|
2564
|
-
* Display the text as inline content
|
|
2565
|
-
*/
|
|
2566
|
-
inline?: boolean;
|
|
2567
|
-
/**
|
|
2568
|
-
* Prevents text from being highlighted and copied
|
|
2569
|
-
*/
|
|
2570
|
-
preventUserSelect?: boolean;
|
|
2571
|
-
/**
|
|
2572
|
-
* 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.
|
|
2573
|
-
*/
|
|
2574
|
-
prominence?: 'button' | 'primary' | 'secondary';
|
|
2575
|
-
/**
|
|
2576
|
-
* This will inherit the jsdoc block from PolymorphicComponent
|
|
2577
|
-
*/
|
|
2578
|
-
renderAs?: ElementType;
|
|
2579
|
-
/**
|
|
2580
|
-
* Number of lines to display before truncating with an ellipsis.
|
|
2581
|
-
* Set to 1 to truncate after a single line, 2 for two lines, etc.
|
|
2582
|
-
* <br />
|
|
2583
|
-
* _Note: this only affects block elements_
|
|
2584
|
-
*/
|
|
2585
|
-
truncate?: number;
|
|
2862
|
+
asChild?: never;
|
|
2863
|
+
variant?: never;
|
|
2864
|
+
size?: never;
|
|
2865
|
+
unstyled?: never;
|
|
2866
|
+
} & {
|
|
2586
2867
|
/**
|
|
2587
|
-
*
|
|
2868
|
+
* Treats the menu item as a link when provided
|
|
2588
2869
|
*/
|
|
2589
|
-
|
|
2590
|
-
}
|
|
2591
|
-
/**
|
|
2592
|
-
* Used for rending paragraphs and inline text.
|
|
2593
|
-
*/
|
|
2594
|
-
declare const Text: (<C extends ElementType = "p">(props: PolymorphicComponentProps<C, TextProps>) => react.ReactElement | null) & UnknownRecord;
|
|
2870
|
+
href?: MenuItemButtonProps["href"];
|
|
2871
|
+
}, "ref">) & react.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
2595
2872
|
|
|
2596
2873
|
type MenuItemLabelProps = {
|
|
2597
2874
|
/**
|
|
@@ -3162,6 +3439,13 @@ declare const ScreenReaderOnly: {
|
|
|
3162
3439
|
displayName: string;
|
|
3163
3440
|
};
|
|
3164
3441
|
|
|
3442
|
+
type ScrollAreaProps = HTMLAttributes<HTMLDivElement>;
|
|
3443
|
+
/**
|
|
3444
|
+
* ScrollArea is a simple scrollable container with shadow effects to indicate
|
|
3445
|
+
* scrollability.
|
|
3446
|
+
*/
|
|
3447
|
+
declare const ScrollArea: react.ForwardRefExoticComponent<ScrollAreaProps & react.RefAttributes<HTMLDivElement>>;
|
|
3448
|
+
|
|
3165
3449
|
type SegmentedControlProps = Omit<ToggleGroupSingleProps, 'type'> & {
|
|
3166
3450
|
/**
|
|
3167
3451
|
* `SegmentedControlItem`s that will be rendered in grouping
|
|
@@ -3695,455 +3979,178 @@ type Storyboard = {
|
|
|
3695
3979
|
__typename?: string;
|
|
3696
3980
|
aspectRatio: number;
|
|
3697
3981
|
frameCount: number;
|
|
3698
|
-
frameHeight: number;
|
|
3699
|
-
frameWidth: number;
|
|
3700
|
-
height: number;
|
|
3701
|
-
id?: string;
|
|
3702
|
-
url: string;
|
|
3703
|
-
width: number;
|
|
3704
|
-
};
|
|
3705
|
-
type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
|
|
3706
|
-
/**
|
|
3707
|
-
* The desired display of the thumbnail, either wide or square
|
|
3708
|
-
*/
|
|
3709
|
-
thumbnailImageType?: 'square' | 'wide' | undefined;
|
|
3710
|
-
/**
|
|
3711
|
-
* The URL of the thumbnail image to display
|
|
3712
|
-
*/
|
|
3713
|
-
thumbnailUrl: string | null;
|
|
3714
|
-
/**
|
|
3715
|
-
* Children to render inside the thumbnail; must be a `ThumbnailBadge` component
|
|
3716
|
-
*/
|
|
3717
|
-
children?: ReactNode;
|
|
3718
|
-
/**
|
|
3719
|
-
* The type of gradient to show either behind the icon or when there is no thumbnail image
|
|
3720
|
-
*/
|
|
3721
|
-
gradientBackground?: GradientNameType;
|
|
3722
|
-
/**
|
|
3723
|
-
* The storyboard data for "scrubbing" functionality
|
|
3724
|
-
*/
|
|
3725
|
-
storyboard?: Storyboard;
|
|
3726
|
-
/**
|
|
3727
|
-
* Width of the thumbnail. By default, the thumbnail will grow to fit its container.
|
|
3728
|
-
* Example: '320px'
|
|
3729
|
-
*/
|
|
3730
|
-
width?: string;
|
|
3731
|
-
/**
|
|
3732
|
-
* The height of the thumbnail container when using storyboard.
|
|
3733
|
-
* Example: '180px'
|
|
3734
|
-
*/
|
|
3735
|
-
height?: string;
|
|
3736
|
-
};
|
|
3737
|
-
/**
|
|
3738
|
-
* A `Thumbnail` is a small, reduced-size version of an image or video used as a preview or representative image.
|
|
3739
|
-
*/
|
|
3740
|
-
declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
|
|
3741
|
-
/**
|
|
3742
|
-
* The desired display of the thumbnail, either wide or square
|
|
3743
|
-
*/
|
|
3744
|
-
thumbnailImageType?: "square" | "wide" | undefined;
|
|
3745
|
-
/**
|
|
3746
|
-
* The URL of the thumbnail image to display
|
|
3747
|
-
*/
|
|
3748
|
-
thumbnailUrl: string | null;
|
|
3749
|
-
/**
|
|
3750
|
-
* Children to render inside the thumbnail; must be a `ThumbnailBadge` component
|
|
3751
|
-
*/
|
|
3752
|
-
children?: ReactNode;
|
|
3753
|
-
/**
|
|
3754
|
-
* The type of gradient to show either behind the icon or when there is no thumbnail image
|
|
3755
|
-
*/
|
|
3756
|
-
gradientBackground?: GradientNameType;
|
|
3757
|
-
/**
|
|
3758
|
-
* The storyboard data for "scrubbing" functionality
|
|
3759
|
-
*/
|
|
3760
|
-
storyboard?: Storyboard;
|
|
3761
|
-
/**
|
|
3762
|
-
* Width of the thumbnail. By default, the thumbnail will grow to fit its container.
|
|
3763
|
-
* Example: '320px'
|
|
3764
|
-
*/
|
|
3765
|
-
width?: string;
|
|
3766
|
-
/**
|
|
3767
|
-
* The height of the thumbnail container when using storyboard.
|
|
3768
|
-
* Example: '180px'
|
|
3769
|
-
*/
|
|
3770
|
-
height?: string;
|
|
3771
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
3772
|
-
|
|
3773
|
-
type ThumbnailCollageProps = {
|
|
3774
|
-
/**
|
|
3775
|
-
* An array of `Thumbnail` components to show in the collage. Supports up to 3 `Thumbnail`s.
|
|
3776
|
-
*/
|
|
3777
|
-
children?: ReactElement<ThumbnailProps>[] | undefined;
|
|
3778
|
-
/**
|
|
3779
|
-
* The type of gradient to show if no `Thumbnail`s are provided
|
|
3780
|
-
*/
|
|
3781
|
-
gradientBackground?: GradientNameType;
|
|
3782
|
-
};
|
|
3783
|
-
/**
|
|
3784
|
-
* A `ThumbnailCollage` is a component that displays multiple `Thumbnail` components in a responsive grid layout.
|
|
3785
|
-
* It supports up to 3 thumbnails arranged in different configurations based on the number of children provided.
|
|
3786
|
-
* If no thumbnails are provided, it displays a fallback thumbnail with a gradient background.
|
|
3787
|
-
*/
|
|
3788
|
-
declare const ThumbnailCollage: ({ children, gradientBackground, ...props }: ThumbnailCollageProps) => JSX.Element;
|
|
3789
|
-
|
|
3790
|
-
type TooltipProps = {
|
|
3791
|
-
/**
|
|
3792
|
-
* The content of the tooltip
|
|
3793
|
-
*/
|
|
3794
|
-
content: ReactNode;
|
|
3795
|
-
/**
|
|
3796
|
-
* The button or other interactive element that triggers the tooltip
|
|
3797
|
-
*/
|
|
3798
|
-
children: ReactNode;
|
|
3799
|
-
/**
|
|
3800
|
-
* The delay in milliseconds before the tooltip appears
|
|
3801
|
-
*/
|
|
3802
|
-
delay?: number;
|
|
3803
|
-
/**
|
|
3804
|
-
* The preferred direction to render the tooltip if no collisions prevent it
|
|
3805
|
-
*/
|
|
3806
|
-
direction?: 'bottom' | 'left' | 'right' | 'top';
|
|
3807
|
-
/**
|
|
3808
|
-
* @ignore
|
|
3809
|
-
* Force the tooltip to be open without user interaction (for debugging and CI)
|
|
3810
|
-
*/
|
|
3811
|
-
forceOpen?: boolean;
|
|
3812
|
-
/**
|
|
3813
|
-
* Hides the arrow
|
|
3814
|
-
*/
|
|
3815
|
-
hideArrow?: boolean;
|
|
3816
|
-
};
|
|
3817
|
-
/**
|
|
3818
|
-
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
3819
|
-
* For elements that are not interactive, consider using a [Popover]() instead.
|
|
3820
|
-
*
|
|
3821
|
-
*/
|
|
3822
|
-
declare const Tooltip: {
|
|
3823
|
-
({ delay, direction, content, children, forceOpen, hideArrow, }: TooltipProps): JSX.Element;
|
|
3824
|
-
displayName: string;
|
|
3825
|
-
};
|
|
3826
|
-
|
|
3827
|
-
type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'height' | 'href'> & {
|
|
3828
|
-
/**
|
|
3829
|
-
* An optional accessible description for the logo
|
|
3830
|
-
*/
|
|
3831
|
-
description?: string;
|
|
3832
|
-
/**
|
|
3833
|
-
* Height, in pixels, of the logo
|
|
3834
|
-
*/
|
|
3835
|
-
height?: number;
|
|
3836
|
-
/**
|
|
3837
|
-
* If provided, will wrap the logo in a link
|
|
3838
|
-
*/
|
|
3839
|
-
href?: string;
|
|
3840
|
-
/**
|
|
3841
|
-
* @ignore
|
|
3842
|
-
* Change the color when hovering over the logo
|
|
3843
|
-
*/
|
|
3844
|
-
hoverColor?: string;
|
|
3845
|
-
/**
|
|
3846
|
-
* Display just the icon portion of the logo (ie. hide `Wistia` text)
|
|
3847
|
-
* note: there is no analogue to this because by brand guidelines, the
|
|
3848
|
-
* `Wistia` text must not be displayed without the "flags" iconography
|
|
3849
|
-
*/
|
|
3850
|
-
iconOnly?: boolean;
|
|
3851
|
-
/**
|
|
3852
|
-
* An accessible title for the logo (defaults to "Wistia Logo")
|
|
3853
|
-
*/
|
|
3854
|
-
title?: string;
|
|
3855
|
-
/**
|
|
3856
|
-
* Style of the logo
|
|
3857
|
-
*/
|
|
3858
|
-
variant?: 'dark' | 'light' | 'standard';
|
|
3859
|
-
/**
|
|
3860
|
-
* If true, the logo will be optically centered within its container
|
|
3861
|
-
*/
|
|
3862
|
-
opticallyCentered?: boolean;
|
|
3863
|
-
};
|
|
3864
|
-
/**
|
|
3865
|
-
* Render the Wistia logo in various ways.
|
|
3866
|
-
*/
|
|
3867
|
-
declare const WistiaLogo: {
|
|
3868
|
-
({ description, height, hoverColor, href, iconOnly, opticallyCentered, title, variant, ...props }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
|
|
3869
|
-
displayName: string;
|
|
3870
|
-
};
|
|
3871
|
-
|
|
3872
|
-
type InputPasswordProps = Omit<InputProps, 'leftIcon' | 'monospace' | 'rightIcon' | 'type'> & {
|
|
3873
|
-
/**
|
|
3874
|
-
* Set the disabled state of the input
|
|
3875
|
-
*/
|
|
3876
|
-
disabled?: boolean;
|
|
3877
|
-
/**
|
|
3878
|
-
* Callback function that is called when the visibility state changes
|
|
3879
|
-
*/
|
|
3880
|
-
onVisibilityToggle?: (isVisible: boolean) => void;
|
|
3881
|
-
};
|
|
3882
|
-
/**
|
|
3883
|
-
* A password input component with a toggle button to show or hide the password text.
|
|
3884
|
-
*/
|
|
3885
|
-
declare const InputPassword: react.ForwardRefExoticComponent<Omit<InputProps, "type" | "monospace" | "leftIcon" | "rightIcon"> & {
|
|
3886
|
-
/**
|
|
3887
|
-
* Set the disabled state of the input
|
|
3888
|
-
*/
|
|
3889
|
-
disabled?: boolean;
|
|
3890
|
-
/**
|
|
3891
|
-
* Callback function that is called when the visibility state changes
|
|
3892
|
-
*/
|
|
3893
|
-
onVisibilityToggle?: (isVisible: boolean) => void;
|
|
3894
|
-
} & react.RefAttributes<HTMLInputElement>>;
|
|
3895
|
-
|
|
3896
|
-
type ContextMenuProps = {
|
|
3897
|
-
children: ReactNode;
|
|
3898
|
-
onRequestClose?: () => void;
|
|
3899
|
-
} & ({
|
|
3900
|
-
position: {
|
|
3901
|
-
x: number;
|
|
3902
|
-
y: number;
|
|
3903
|
-
};
|
|
3904
|
-
triggerRef?: never;
|
|
3905
|
-
} | {
|
|
3906
|
-
position?: never;
|
|
3907
|
-
triggerRef: RefObject<HTMLElement>;
|
|
3908
|
-
});
|
|
3909
|
-
/**
|
|
3910
|
-
* The ContextMenu is an extended implementation of the [Menu]() component that allows for right-click context menus.
|
|
3911
|
-
* It can be used in two ways:
|
|
3912
|
-
* 1. By providing a `triggerRef`, which will render the menu when the referenced element is right-clicked.
|
|
3913
|
-
* 2. By providing a `position` prop, which will render the menu at the specified coordinates.
|
|
3914
|
-
*/
|
|
3915
|
-
declare const ContextMenu: ({ position, triggerRef, children, onRequestClose, }: ContextMenuProps) => react_jsx_runtime.JSX.Element | null;
|
|
3916
|
-
|
|
3917
|
-
declare const typographicVariantStyleMap: {
|
|
3918
|
-
hero: styled_components.FlattenSimpleInterpolation;
|
|
3919
|
-
heading1: styled_components.FlattenSimpleInterpolation;
|
|
3920
|
-
heading2: styled_components.FlattenSimpleInterpolation;
|
|
3921
|
-
heading3: styled_components.FlattenSimpleInterpolation;
|
|
3922
|
-
heading4: styled_components.FlattenSimpleInterpolation;
|
|
3923
|
-
heading5: styled_components.FlattenSimpleInterpolation;
|
|
3924
|
-
heading6: styled_components.FlattenSimpleInterpolation;
|
|
3925
|
-
body1: styled_components.FlattenSimpleInterpolation;
|
|
3926
|
-
body2: styled_components.FlattenSimpleInterpolation;
|
|
3927
|
-
body3: styled_components.FlattenSimpleInterpolation;
|
|
3928
|
-
body4: styled_components.FlattenSimpleInterpolation;
|
|
3929
|
-
body1Mono: styled_components.FlattenSimpleInterpolation;
|
|
3930
|
-
body2Mono: styled_components.FlattenSimpleInterpolation;
|
|
3931
|
-
body3Mono: styled_components.FlattenSimpleInterpolation;
|
|
3932
|
-
body4Mono: styled_components.FlattenSimpleInterpolation;
|
|
3933
|
-
label1: styled_components.FlattenSimpleInterpolation;
|
|
3934
|
-
label2: styled_components.FlattenSimpleInterpolation;
|
|
3935
|
-
label3: styled_components.FlattenSimpleInterpolation;
|
|
3936
|
-
label4: styled_components.FlattenSimpleInterpolation;
|
|
3982
|
+
frameHeight: number;
|
|
3983
|
+
frameWidth: number;
|
|
3984
|
+
height: number;
|
|
3985
|
+
id?: string;
|
|
3986
|
+
url: string;
|
|
3987
|
+
width: number;
|
|
3937
3988
|
};
|
|
3938
|
-
type
|
|
3939
|
-
|
|
3940
|
-
type EditableTextRootProps = Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue'> & {
|
|
3989
|
+
type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
|
|
3941
3990
|
/**
|
|
3942
|
-
* The
|
|
3991
|
+
* The desired display of the thumbnail, either wide or square
|
|
3943
3992
|
*/
|
|
3944
|
-
|
|
3993
|
+
thumbnailImageType?: 'square' | 'wide' | undefined;
|
|
3945
3994
|
/**
|
|
3946
|
-
* The
|
|
3995
|
+
* The URL of the thumbnail image to display
|
|
3947
3996
|
*/
|
|
3948
|
-
|
|
3997
|
+
thumbnailUrl: string | null;
|
|
3949
3998
|
/**
|
|
3950
|
-
*
|
|
3999
|
+
* Children to render inside the thumbnail; must be a `ThumbnailBadge` component
|
|
3951
4000
|
*/
|
|
3952
|
-
|
|
4001
|
+
children?: ReactNode;
|
|
3953
4002
|
/**
|
|
3954
|
-
*
|
|
4003
|
+
* The type of gradient to show either behind the icon or when there is no thumbnail image
|
|
3955
4004
|
*/
|
|
3956
|
-
|
|
4005
|
+
gradientBackground?: GradientNameType;
|
|
3957
4006
|
/**
|
|
3958
|
-
*
|
|
4007
|
+
* The storyboard data for "scrubbing" functionality
|
|
3959
4008
|
*/
|
|
3960
|
-
|
|
4009
|
+
storyboard?: Storyboard;
|
|
3961
4010
|
/**
|
|
3962
|
-
*
|
|
4011
|
+
* Width of the thumbnail. By default, the thumbnail will grow to fit its container.
|
|
4012
|
+
* Example: '320px'
|
|
3963
4013
|
*/
|
|
3964
|
-
|
|
4014
|
+
width?: string;
|
|
3965
4015
|
/**
|
|
3966
|
-
*
|
|
4016
|
+
* The height of the thumbnail container when using storyboard.
|
|
4017
|
+
* Example: '180px'
|
|
3967
4018
|
*/
|
|
3968
|
-
|
|
4019
|
+
height?: string;
|
|
4020
|
+
};
|
|
4021
|
+
/**
|
|
4022
|
+
* A `Thumbnail` is a small, reduced-size version of an image or video used as a preview or representative image.
|
|
4023
|
+
*/
|
|
4024
|
+
declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
|
|
3969
4025
|
/**
|
|
3970
|
-
* The
|
|
4026
|
+
* The desired display of the thumbnail, either wide or square
|
|
3971
4027
|
*/
|
|
3972
|
-
|
|
4028
|
+
thumbnailImageType?: "square" | "wide" | undefined;
|
|
3973
4029
|
/**
|
|
3974
|
-
* The
|
|
3975
|
-
* - "enter": Trigger submit when the enter key is pressed, or dismiss when the esc key is pressed
|
|
3976
|
-
* - "blur": Trigger submit when the editable is blurred, or dismiss when the esc key is pressed
|
|
3977
|
-
* - "none": No action will trigger submit or dismiss. You need to use the submit or dismiss buttons
|
|
3978
|
-
* - "both": Pressing Enter and blurring the input will trigger submit, or dismiss when the esc key is pressed
|
|
4030
|
+
* The URL of the thumbnail image to display
|
|
3979
4031
|
*/
|
|
3980
|
-
|
|
4032
|
+
thumbnailUrl: string | null;
|
|
3981
4033
|
/**
|
|
3982
|
-
*
|
|
4034
|
+
* Children to render inside the thumbnail; must be a `ThumbnailBadge` component
|
|
3983
4035
|
*/
|
|
3984
|
-
|
|
4036
|
+
children?: ReactNode;
|
|
3985
4037
|
/**
|
|
3986
|
-
* The
|
|
4038
|
+
* The type of gradient to show either behind the icon or when there is no thumbnail image
|
|
3987
4039
|
*/
|
|
3988
|
-
|
|
4040
|
+
gradientBackground?: GradientNameType;
|
|
3989
4041
|
/**
|
|
3990
|
-
* The
|
|
4042
|
+
* The storyboard data for "scrubbing" functionality
|
|
3991
4043
|
*/
|
|
3992
|
-
|
|
4044
|
+
storyboard?: Storyboard;
|
|
3993
4045
|
/**
|
|
3994
|
-
*
|
|
4046
|
+
* Width of the thumbnail. By default, the thumbnail will grow to fit its container.
|
|
4047
|
+
* Example: '320px'
|
|
3995
4048
|
*/
|
|
3996
|
-
|
|
4049
|
+
width?: string;
|
|
3997
4050
|
/**
|
|
3998
|
-
*
|
|
4051
|
+
* The height of the thumbnail container when using storyboard.
|
|
4052
|
+
* Example: '180px'
|
|
3999
4053
|
*/
|
|
4000
|
-
|
|
4054
|
+
height?: string;
|
|
4055
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
4056
|
+
|
|
4057
|
+
type ThumbnailCollageProps = {
|
|
4001
4058
|
/**
|
|
4002
|
-
*
|
|
4059
|
+
* An array of `Thumbnail` components to show in the collage. Supports up to 3 `Thumbnail`s.
|
|
4003
4060
|
*/
|
|
4004
|
-
|
|
4061
|
+
children?: ReactElement<ThumbnailProps>[] | undefined;
|
|
4005
4062
|
/**
|
|
4006
|
-
* The
|
|
4063
|
+
* The type of gradient to show if no `Thumbnail`s are provided
|
|
4007
4064
|
*/
|
|
4008
|
-
|
|
4009
|
-
};
|
|
4010
|
-
type EditableTextContextValues = {
|
|
4011
|
-
isEditing: boolean;
|
|
4012
|
-
setIsEditing: (editing: boolean) => void;
|
|
4013
|
-
value: string;
|
|
4014
|
-
setValue: (value: string) => void;
|
|
4015
|
-
originalValue: string;
|
|
4016
|
-
onValueCommit: ((value: string) => void) | undefined;
|
|
4017
|
-
onValueRevert: ((originalValue: string) => void) | undefined;
|
|
4018
|
-
typographicVariant: TypographicVariant;
|
|
4019
|
-
submitMode: 'blur' | 'both' | 'enter' | 'none';
|
|
4020
|
-
readOnly: boolean;
|
|
4021
|
-
id: string;
|
|
4022
|
-
label: string;
|
|
4023
|
-
placeholder: string;
|
|
4024
|
-
minLines: number;
|
|
4025
|
-
maxLines: number | undefined;
|
|
4026
|
-
finalFocusEl: (() => HTMLElement | null) | undefined;
|
|
4065
|
+
gradientBackground?: GradientNameType;
|
|
4027
4066
|
};
|
|
4028
|
-
|
|
4029
|
-
|
|
4067
|
+
/**
|
|
4068
|
+
* A `ThumbnailCollage` is a component that displays multiple `Thumbnail` components in a responsive grid layout.
|
|
4069
|
+
* It supports up to 3 thumbnails arranged in different configurations based on the number of children provided.
|
|
4070
|
+
* If no thumbnails are provided, it displays a fallback thumbnail with a gradient background.
|
|
4071
|
+
*/
|
|
4072
|
+
declare const ThumbnailCollage: ({ children, gradientBackground, ...props }: ThumbnailCollageProps) => JSX.Element;
|
|
4030
4073
|
|
|
4031
|
-
type
|
|
4074
|
+
type TooltipProps = {
|
|
4032
4075
|
/**
|
|
4033
|
-
*
|
|
4076
|
+
* The content of the tooltip
|
|
4034
4077
|
*/
|
|
4035
|
-
|
|
4078
|
+
content: ReactNode;
|
|
4079
|
+
/**
|
|
4080
|
+
* The button or other interactive element that triggers the tooltip
|
|
4081
|
+
*/
|
|
4082
|
+
children: ReactNode;
|
|
4083
|
+
/**
|
|
4084
|
+
* The delay in milliseconds before the tooltip appears
|
|
4085
|
+
*/
|
|
4086
|
+
delay?: number;
|
|
4087
|
+
/**
|
|
4088
|
+
* The preferred direction to render the tooltip if no collisions prevent it
|
|
4089
|
+
*/
|
|
4090
|
+
direction?: 'bottom' | 'left' | 'right' | 'top';
|
|
4091
|
+
/**
|
|
4092
|
+
* @ignore
|
|
4093
|
+
* Force the tooltip to be open without user interaction (for debugging and CI)
|
|
4094
|
+
*/
|
|
4095
|
+
forceOpen?: boolean;
|
|
4096
|
+
/**
|
|
4097
|
+
* Hides the arrow
|
|
4098
|
+
*/
|
|
4099
|
+
hideArrow?: boolean;
|
|
4036
4100
|
};
|
|
4037
4101
|
/**
|
|
4038
|
-
*
|
|
4102
|
+
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
4103
|
+
* For elements that are not interactive, consider using a [Popover]() instead.
|
|
4104
|
+
*
|
|
4039
4105
|
*/
|
|
4040
|
-
declare const
|
|
4041
|
-
({
|
|
4106
|
+
declare const Tooltip: {
|
|
4107
|
+
({ delay, direction, content, children, forceOpen, hideArrow, }: TooltipProps): JSX.Element;
|
|
4042
4108
|
displayName: string;
|
|
4043
4109
|
};
|
|
4044
4110
|
|
|
4045
|
-
type
|
|
4111
|
+
type WistiaLogoProps = Omit<ComponentPropsWithoutRef<'svg'>, 'height' | 'href'> & {
|
|
4046
4112
|
/**
|
|
4047
|
-
*
|
|
4113
|
+
* An optional accessible description for the logo
|
|
4048
4114
|
*/
|
|
4049
|
-
|
|
4050
|
-
renderAs?: ElementType;
|
|
4051
|
-
};
|
|
4052
|
-
declare const EditableTextDisplay: (<C extends ElementType = "h1">(props: PolymorphicComponentProps<C, EditableTextDisplayProps>) => react.ReactElement | null) & UnknownRecord;
|
|
4053
|
-
|
|
4054
|
-
type EditableTextLabelProps = Omit<LabelProps, 'disabled' | 'htmlFor' | 'required'>;
|
|
4055
|
-
declare const EditableTextLabel: ({ ...props }: EditableTextLabelProps) => react_jsx_runtime.JSX.Element;
|
|
4056
|
-
|
|
4057
|
-
declare const EditableTextSubmitButton: ({ children, }: {
|
|
4058
|
-
children: ReactElement;
|
|
4059
|
-
}) => JSX.Element | null;
|
|
4060
|
-
|
|
4061
|
-
type EditableTextCancelButtonProps = {
|
|
4115
|
+
description?: string;
|
|
4062
4116
|
/**
|
|
4063
|
-
*
|
|
4117
|
+
* Height, in pixels, of the logo
|
|
4064
4118
|
*/
|
|
4065
|
-
|
|
4066
|
-
};
|
|
4067
|
-
declare const EditableTextCancelButton: ({ children, }: EditableTextCancelButtonProps) => React.JSX.Element | null;
|
|
4068
|
-
|
|
4069
|
-
type EditableTextTriggerProps = {
|
|
4119
|
+
height?: number;
|
|
4070
4120
|
/**
|
|
4071
|
-
*
|
|
4121
|
+
* If provided, will wrap the logo in a link
|
|
4072
4122
|
*/
|
|
4073
|
-
|
|
4074
|
-
};
|
|
4075
|
-
declare const EditableTextTrigger: ({ children, ...props }: EditableTextTriggerProps) => JSX.Element | null;
|
|
4076
|
-
|
|
4077
|
-
type EditableTextInputProps = Pick<InputProps, 'autoSelect'>;
|
|
4078
|
-
declare const EditableTextInput: (props: EditableTextInputProps) => JSX.Element | null;
|
|
4079
|
-
|
|
4080
|
-
type DataListProps = ComponentPropsWithoutRef<'dl'> & {
|
|
4123
|
+
href?: string;
|
|
4081
4124
|
/**
|
|
4082
|
-
*
|
|
4125
|
+
* @ignore
|
|
4126
|
+
* Change the color when hovering over the logo
|
|
4083
4127
|
*/
|
|
4084
|
-
|
|
4128
|
+
hoverColor?: string;
|
|
4085
4129
|
/**
|
|
4086
|
-
*
|
|
4130
|
+
* Display just the icon portion of the logo (ie. hide `Wistia` text)
|
|
4131
|
+
* note: there is no analogue to this because by brand guidelines, the
|
|
4132
|
+
* `Wistia` text must not be displayed without the "flags" iconography
|
|
4087
4133
|
*/
|
|
4088
|
-
|
|
4134
|
+
iconOnly?: boolean;
|
|
4089
4135
|
/**
|
|
4090
|
-
*
|
|
4136
|
+
* An accessible title for the logo (defaults to "Wistia Logo")
|
|
4091
4137
|
*/
|
|
4092
|
-
|
|
4138
|
+
title?: string;
|
|
4093
4139
|
/**
|
|
4094
|
-
*
|
|
4140
|
+
* Style of the logo
|
|
4095
4141
|
*/
|
|
4096
|
-
|
|
4097
|
-
};
|
|
4098
|
-
/**
|
|
4099
|
-
* The DataList component is used to display a list of items with labels and values.
|
|
4100
|
-
*/
|
|
4101
|
-
declare const DataList: {
|
|
4102
|
-
({ children, valueAlignment, labelMaxWith, labelProminence, ...props }: DataListProps): JSX.Element;
|
|
4103
|
-
displayName: string;
|
|
4104
|
-
};
|
|
4105
|
-
|
|
4106
|
-
type DataListItemProps = Omit<ComponentPropsWithoutRef<'dl'>, 'children'> & {
|
|
4142
|
+
variant?: 'dark' | 'light' | 'standard';
|
|
4107
4143
|
/**
|
|
4108
|
-
*
|
|
4144
|
+
* If true, the logo will be optically centered within its container
|
|
4109
4145
|
*/
|
|
4110
|
-
|
|
4111
|
-
};
|
|
4112
|
-
/**
|
|
4113
|
-
* An item within a `DataList`. It should only contain `DataListItemLabel` and `DataListItemValue` components.
|
|
4114
|
-
*/
|
|
4115
|
-
declare const DataListItem: {
|
|
4116
|
-
({ children }: DataListItemProps): ReactNode;
|
|
4117
|
-
displayName: string;
|
|
4118
|
-
};
|
|
4119
|
-
|
|
4120
|
-
/**
|
|
4121
|
-
* The label of the `DataListItem`. Extends the [Text]() component.
|
|
4122
|
-
*/
|
|
4123
|
-
declare const DataListItemLabel: {
|
|
4124
|
-
(props: TextProps): JSX.Element;
|
|
4125
|
-
displayName: string;
|
|
4126
|
-
};
|
|
4127
|
-
|
|
4128
|
-
/**
|
|
4129
|
-
* The value of the `DataListItem`. Extends the [Text]() component.
|
|
4130
|
-
*/
|
|
4131
|
-
declare const DataListItemValue: {
|
|
4132
|
-
(props: TextProps): JSX.Element;
|
|
4133
|
-
displayName: string;
|
|
4134
|
-
};
|
|
4135
|
-
|
|
4136
|
-
type MarkProps = ComponentPropsWithoutRef<'div'> & {
|
|
4137
|
-
/** The content of the Mark component. */
|
|
4138
|
-
children: ReactNode;
|
|
4139
|
-
colorScheme?: ColorSchemeTypes;
|
|
4146
|
+
opticallyCentered?: boolean;
|
|
4140
4147
|
};
|
|
4141
4148
|
/**
|
|
4142
|
-
*
|
|
4149
|
+
* Render the Wistia logo in various ways.
|
|
4143
4150
|
*/
|
|
4144
|
-
declare const
|
|
4145
|
-
({
|
|
4151
|
+
declare const WistiaLogo: {
|
|
4152
|
+
({ description, height, hoverColor, href, iconOnly, opticallyCentered, title, variant, ...props }: WistiaLogoProps): react_jsx_runtime.JSX.Element;
|
|
4146
4153
|
displayName: string;
|
|
4147
4154
|
};
|
|
4148
4155
|
|
|
4149
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Mark, type MarkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|
|
4156
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, type ColorGridOptionProps, type ColorGridProps, ColorList, ColorListGroup, type ColorListGroupProps, ColorListOption, type ColorListOptionProps, type ColorListProps, ColorPicker, ColorPickerPopoverContent, type ColorPickerPopoverContentProps, type ColorPickerProps, ColorPickerSection, type ColorPickerSectionProps, ColorPickerTrigger, type ColorPickerTriggerProps, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, ComboboxOption, type ComboboxOptionProps, type ComboboxProps, ContextMenu, type ContextMenuProps, ContrastControls, DataCard, DataCardHoverArrow, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, DataList, DataListItem, DataListItemLabel, DataListItemValue, type DataListProps, Divider, EditableHeading, type EditableHeadingProps, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, type EditableTextProps, EditableTextRoot, type EditableTextRootProps, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, type EllipsisProps, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Grid, type GridProps, Heading, type HeadingProps, HexColorInput, type HexColorInputProps, HueSlider, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, InputPassword, type InputPasswordProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Mark, type MarkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioCard, RadioCardImage, type RadioCardImageProps, type RadioCardProps, RadioGroup, RadioMenuItem, type RadioProps, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Slider, type SliderProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|