import React from 'react'; import { type Size } from '../../util/variant-types'; export type OrderedListProps = React.HTMLAttributes & { /** * Size of the list and its item (controls spacing but requires proper usage of `Text`/`Heading` when composing) */ size?: Extract; /** * Marker to use with the given list type * - for `OrderedList`, will use no marker or the `default` marker (e.g., "1.") */ markerType?: 'none' | 'default'; }; export type UnorderedListProps = React.HTMLAttributes & { /** * Size of the list and its item (controls spacing but requires proper usage of `Text`/`Heading` when composing) */ size?: Extract; /** * Marker to use with the given list type * - for `UnorderedList`, will use no marker or the `default` marker (e.g., "•") */ markerType?: 'none' | 'default'; }; export type ListItemProps = React.HTMLAttributes & { size?: Extract; }; export declare const ListContext: React.Context<{ size: UnorderedListProps["size"] | OrderedListProps["size"]; }>; export declare function getListStyleProps(props: OrderedListProps | UnorderedListProps): { className: string; }; export declare function getListItemStyleProps(props: ListItemProps): { className: string; }; /** * ## Usage * * * **Unordered**: Used for content where the order is not important. * * **Ordered**: Used for content where the order is important. * * EDS supports 1 level of nesting because our current products don't require deeper nesting. * * ### Unordered Lists * * | Type/Use | Description | Example | * |----------|-------------|---------| * |Data presentation|Presents grouped or related information in an organized manner.|A list of user names with their status or profile images.| * |Hierarchical Data|Displays nested items or subcategories.|A file tree or nested comments in a discussion thread.| * * ### Ordered Lists * * | Type/Use | Description | Example | * |----------|-------------|---------| * |Steps / Instructions|Lists steps in a specific order.|A step-by-step guide for setting up an account.| * |Nested steps|Breaks a long list of steps into groups of steps that accomplish a discrete action or piece of the overall task.|Long, complex procedures.| * * ### Best Practices * * * Include headings for lists that use custom characters instead of standard bullets or numbering. * * Don't rely on custom character bullets to convey meaning. * * Don't use multiple custom characters for one list item. * * ## Content & Accessibility * * ### Do's * * * Keep each list item short and to the point. * * Use parallel structure in list items to aid understanding. * * @param props options for the list to control size and marker type * @returns ReactNode */ export declare const UnorderedList: { (props: UnorderedListProps): React.JSX.Element; displayName: string; ListItem: { (props: ListItemProps): React.JSX.Element; displayName: string; }; }; /** * Control a list of text items that are semantically ordered (ordinal sequence by number). * * @param props options for the list to control size and marker type * @returns ReactNode */ export declare const OrderedList: { (props: OrderedListProps): React.JSX.Element; displayName: string; ListItem: { (props: ListItemProps): React.JSX.Element; displayName: string; }; };