@eqtylab/equality 4.14.1 → 4.15.0

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.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as React$1 from 'react';
4
- import { HTMLAttributes, ReactNode, ComponentPropsWithoutRef } from 'react';
4
+ import { HTMLAttributes, ReactNode, KeyboardEvent, ComponentPropsWithoutRef } from 'react';
5
5
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
6
6
  import { VariantProps } from 'class-variance-authority';
7
7
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
@@ -1513,7 +1513,7 @@ interface IconButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonEl
1513
1513
  *
1514
1514
  * [Icon Button documentation](https://equality.eqtylab.io/components/icon-button)
1515
1515
  */
1516
- declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element;
1516
+ declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
1517
1517
 
1518
1518
  declare const iconVariants: (props?: ({
1519
1519
  size?: "sm" | "md" | "lg" | "xs" | null | undefined;
@@ -1671,6 +1671,223 @@ interface MotionCollapsibleContentProps {
1671
1671
  */
1672
1672
  declare const MotionCollapsibleContent: ({ isOpen, children, className, }: MotionCollapsibleContentProps) => react_jsx_runtime.JSX.Element;
1673
1673
 
1674
+ type NavDrillRequest = 'drill' | 'back';
1675
+ interface NavDrillProps extends React$1.HTMLAttributes<HTMLDivElement> {
1676
+ /** Controlled: the `value` of the level on show */
1677
+ value?: string;
1678
+ /** Uncontrolled: the `value` of the first level */
1679
+ defaultValue?: string;
1680
+ /** Called when a drill row or ‹ asks for a level; a controlled caller sets `value` from it */
1681
+ onValueChange?: (value: string, request: NavDrillRequest) => void;
1682
+ /** Slides levels in and out after a drill row or ‹; off swaps them at once */
1683
+ animate?: boolean;
1684
+ }
1685
+ /**
1686
+ * **Props**
1687
+ * - `value?: string` — Controlled: the `value` of the level on show
1688
+ * - `defaultValue?: string` — Uncontrolled: the `value` of the first level
1689
+ * - `onValueChange?: (value: string, request: NavDrillRequest) => void` — Called when a drill row or ‹ asks for a level; a controlled caller sets `value` from it
1690
+ * - `animate?: boolean` (default `true`) — Slides levels in and out after a drill row or ‹; off swaps them at once
1691
+ *
1692
+ * Also accepts the standard `HTMLDivElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1693
+ */
1694
+ declare const NavDrill: React$1.ForwardRefExoticComponent<NavDrillProps & React$1.RefAttributes<HTMLDivElement>>;
1695
+ interface NavDrillLevelBaseProps extends React$1.HTMLAttributes<HTMLDivElement> {
1696
+ /** The `NavDrill` value that shows this level; must be a direct child of `NavDrill` */
1697
+ value: string;
1698
+ }
1699
+ interface NavDrillChildLevelProps extends NavDrillLevelBaseProps {
1700
+ /** The `value` ‹ returns to; draws the ‹ row at the top of the level */
1701
+ parent?: string;
1702
+ /** Names where you are, on the ‹ row */
1703
+ label: string;
1704
+ /** The ‹ row's accessible name; must start with `label` (WCAG 2.5.3). @default "{label}, back" */
1705
+ backLabel?: string;
1706
+ }
1707
+ interface NavDrillTopLevelProps extends NavDrillLevelBaseProps {
1708
+ parent?: undefined;
1709
+ label?: undefined;
1710
+ backLabel?: undefined;
1711
+ }
1712
+ type NavDrillLevelProps = NavDrillChildLevelProps | NavDrillTopLevelProps;
1713
+ /**
1714
+ * **Props**
1715
+ * - `value: string` — The `NavDrill` value that shows this level; must be a direct child of `NavDrill`
1716
+ * - `parent?: string` — The `value` ‹ returns to; draws the ‹ row at the top of the level
1717
+ * - `label?: string` — Names where you are, on the ‹ row
1718
+ * - `backLabel?: string` (default `"{label}, back"`) — The ‹ row's accessible name; must start with `label` (WCAG 2.5.3).
1719
+ *
1720
+ * Also accepts the standard `HTMLDivElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1721
+ */
1722
+ declare const NavDrillLevel: React$1.ForwardRefExoticComponent<NavDrillLevelProps & React$1.RefAttributes<HTMLDivElement>>;
1723
+
1724
+ type NavListProps = React$1.HTMLAttributes<HTMLDivElement>;
1725
+ /**
1726
+ * Accepts the standard `HTMLDivElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1727
+ */
1728
+ declare const NavList: React$1.ForwardRefExoticComponent<NavListProps & React$1.RefAttributes<HTMLDivElement>>;
1729
+ interface NavListGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
1730
+ /** Names the group's list; leave it out where a ‹ row already names what the rows belong to */
1731
+ label?: string;
1732
+ }
1733
+ /**
1734
+ * **Props**
1735
+ * - `label?: string` — Names the group's list; leave it out where a ‹ row already names what the rows belong to
1736
+ *
1737
+ * Also accepts the standard `HTMLDivElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1738
+ */
1739
+ declare const NavListGroup: React$1.ForwardRefExoticComponent<NavListGroupProps & React$1.RefAttributes<HTMLDivElement>>;
1740
+ interface NavListItemProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'prefix'>, Pick<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'rel' | 'download'> {
1741
+ /** The row's text, also its full title when it truncates */
1742
+ label: string;
1743
+ /** An icon before the label, on top-level rows only; hidden from screen readers */
1744
+ prefix?: React$1.ReactNode;
1745
+ /** Badges or marks after the label; screen readers read them as part of the row */
1746
+ suffix?: React$1.ReactNode;
1747
+ /** Marks the row as the page on show */
1748
+ current?: boolean;
1749
+ /** The `value` of the `NavDrillLevel` this row opens; adds the › caret */
1750
+ drill?: string;
1751
+ /** Renders the row as its only child, such as a router link */
1752
+ asChild?: boolean;
1753
+ }
1754
+ /**
1755
+ * **Props**
1756
+ * - `label: string` — The row's text, also its full title when it truncates
1757
+ * - `prefix?: React.ReactNode` — An icon before the label, on top-level rows only; hidden from screen readers
1758
+ * - `suffix?: React.ReactNode` — Badges or marks after the label; screen readers read them as part of the row
1759
+ * - `current?: boolean` (default `false`) — Marks the row as the page on show
1760
+ * - `drill?: string` — The `value` of the `NavDrillLevel` this row opens; adds the › caret
1761
+ * - `asChild?: boolean` (default `false`) — Renders the row as its only child, such as a router link
1762
+ *
1763
+ * Also accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1764
+ */
1765
+ declare const NavListItem: React$1.ForwardRefExoticComponent<NavListItemProps & React$1.RefAttributes<HTMLElement>>;
1766
+ /**
1767
+ * Accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1768
+ */
1769
+ declare const NavListSeparator: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
1770
+
1771
+ interface NavPanelProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'title'> {
1772
+ /** Names the panel's landmark */
1773
+ 'aria-label': string;
1774
+ /** Above the rows, such as a `NavSwitcher` or a heading */
1775
+ header?: React$1.ReactNode;
1776
+ }
1777
+ /**
1778
+ * **Props**
1779
+ * - `"aria-label": string` — Names the panel's landmark
1780
+ * - `header?: React.ReactNode` — Above the rows, such as a `NavSwitcher` or a heading
1781
+ *
1782
+ * Also accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1783
+ *
1784
+ * [Nav documentation](https://equality.eqtylab.io/components/nav)
1785
+ */
1786
+ declare const NavPanel: React$1.ForwardRefExoticComponent<NavPanelProps & React$1.RefAttributes<HTMLElement>>;
1787
+
1788
+ interface NavRailProps extends React$1.HTMLAttributes<HTMLElement> {
1789
+ /** Names the rail's landmark */
1790
+ 'aria-label': string;
1791
+ }
1792
+ /**
1793
+ * **Props**
1794
+ * - `"aria-label": string` — Names the rail's landmark
1795
+ *
1796
+ * Also accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1797
+ *
1798
+ * [Nav documentation](https://equality.eqtylab.io/components/nav)
1799
+ */
1800
+ declare const NavRail: React$1.ForwardRefExoticComponent<NavRailProps & React$1.RefAttributes<HTMLElement>>;
1801
+ interface NavRailItemBaseProps extends Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
1802
+ /** The item's only visible content; hidden from screen readers */
1803
+ icon: React$1.ReactNode;
1804
+ /** The item's accessible name and its tooltip */
1805
+ label: string;
1806
+ /** Marks the item as the section on show */
1807
+ current?: boolean;
1808
+ }
1809
+ interface NavRailItemLinkProps extends NavRailItemBaseProps {
1810
+ /** Where the item goes */
1811
+ href: string;
1812
+ asChild?: false;
1813
+ }
1814
+ interface NavRailItemSlotProps extends NavRailItemBaseProps {
1815
+ href?: string;
1816
+ /** Renders the item as its only child, such as a router link */
1817
+ asChild: true;
1818
+ }
1819
+ type NavRailItemProps = NavRailItemLinkProps | NavRailItemSlotProps;
1820
+ /**
1821
+ * **Props**
1822
+ * - `icon: React.ReactNode` — The item's only visible content; hidden from screen readers
1823
+ * - `label: string` — The item's accessible name and its tooltip
1824
+ * - `current?: boolean` (default `false`) — Marks the item as the section on show
1825
+ * - `href?: string` — Where the item goes
1826
+ * - `asChild?: false | true` (default `false`) — Renders the item as its only child, such as a router link
1827
+ *
1828
+ * Also accepts the standard `HTMLAnchorElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1829
+ *
1830
+ * [Nav documentation](https://equality.eqtylab.io/components/nav)
1831
+ */
1832
+ declare const NavRailItem: React$1.ForwardRefExoticComponent<NavRailItemProps & React$1.RefAttributes<HTMLAnchorElement>>;
1833
+
1834
+ interface NavSwitcherOption {
1835
+ /** The option's value, passed to `onValueChange` */
1836
+ value: string;
1837
+ /** The option's name in the list */
1838
+ label: string;
1839
+ /** Matched by search as well as the label, for identifiers a user may know but never sees */
1840
+ keywords?: string[];
1841
+ }
1842
+ interface NavSwitcherAction {
1843
+ /** The action's link text */
1844
+ label: string;
1845
+ /** Runs once the list has closed */
1846
+ onSelect: () => void;
1847
+ }
1848
+ interface NavSwitcherLoadedProps {
1849
+ /** Shows a placeholder at the switcher's height while the current item loads */
1850
+ loading?: false;
1851
+ /** The current item's name, shown as the panel's heading */
1852
+ label: string;
1853
+ /** Singular and lowercase, for the trigger's name: "{label}, switch {noun}" */
1854
+ noun: string;
1855
+ /** Plural and lowercase, for the search and empty copy */
1856
+ collection: string;
1857
+ /** The items to switch between */
1858
+ options: NavSwitcherOption[];
1859
+ /** The current item's value */
1860
+ value: string;
1861
+ /** Called with the picked item's value */
1862
+ onValueChange: (value: string) => void;
1863
+ /** Hover or focus on an option, for a caller that warms its destination */
1864
+ onHighlight?: (value: string) => void;
1865
+ /** Hover or focus leaves an option */
1866
+ onHighlightEnd?: () => void;
1867
+ /** A command at the bottom of the list, kept while searching, such as "Create Project" */
1868
+ action?: NavSwitcherAction;
1869
+ }
1870
+ interface NavSwitcherLoadingProps {
1871
+ loading: true;
1872
+ }
1873
+ type NavSwitcherProps = NavSwitcherLoadedProps | NavSwitcherLoadingProps;
1874
+ /**
1875
+ * **Props**
1876
+ * - `loading?: false | true` — Shows a placeholder at the switcher's height while the current item loads
1877
+ * - `label?: string` — The current item's name, shown as the panel's heading
1878
+ * - `noun?: string` — Singular and lowercase, for the trigger's name: "{label}, switch {noun}"
1879
+ * - `collection?: string` — Plural and lowercase, for the search and empty copy
1880
+ * - `options?: NavSwitcherOption[]` — The items to switch between
1881
+ * - `value?: string` — The current item's value
1882
+ * - `onValueChange?: (value: string) => void` — Called with the picked item's value
1883
+ * - `onHighlight?: (value: string) => void` — Hover or focus on an option, for a caller that warms its destination
1884
+ * - `onHighlightEnd?: () => void` — Hover or focus leaves an option
1885
+ * - `action?: NavSwitcherAction` — A command at the bottom of the list, kept while searching, such as "Create Project"
1886
+ *
1887
+ * [Nav documentation](https://equality.eqtylab.io/components/nav)
1888
+ */
1889
+ declare const NavSwitcher: React$1.ForwardRefExoticComponent<NavSwitcherProps & React$1.RefAttributes<HTMLButtonElement>>;
1890
+
1674
1891
  interface NotFoundProps {
1675
1892
  className?: string;
1676
1893
  title?: string;
@@ -2229,6 +2446,8 @@ declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrim
2229
2446
  persistent?: boolean;
2230
2447
  } & React$1.RefAttributes<HTMLDivElement>>;
2231
2448
 
2449
+ declare const blockClosedTypeahead: (event: KeyboardEvent<HTMLButtonElement>) => void;
2450
+
2232
2451
  /**
2233
2452
  * **Props**
2234
2453
  * - `asChild?: boolean`
@@ -2958,4 +3177,4 @@ declare const CODE_BLOCK_ATTRIBUTE = "data-equality-code-block";
2958
3177
  */
2959
3178
  declare const scheduleHighlight: (root?: Node) => Promise<void>;
2960
3179
 
2961
- export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, CODE_BLOCK_ATTRIBUTE, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, type SegmentedControlOption, type SegmentedControlVariant, SegmentedControls, type SegmentedControlsDisplay, type SegmentedControlsProps, type SegmentedControlsSize, Select, SelectContent, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
3180
+ export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, CODE_BLOCK_ATTRIBUTE, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NavDrill, NavDrillLevel, type NavDrillLevelProps, type NavDrillProps, type NavDrillRequest, NavList, NavListGroup, type NavListGroupProps, NavListItem, type NavListItemProps, type NavListProps, NavListSeparator, NavPanel, type NavPanelProps, NavRail, NavRailItem, type NavRailItemProps, type NavRailProps, NavSwitcher, type NavSwitcherAction, type NavSwitcherOption, type NavSwitcherProps, NotFound, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, type SegmentedControlOption, type SegmentedControlVariant, SegmentedControls, type SegmentedControlsDisplay, type SegmentedControlsProps, type SegmentedControlsSize, Select, SelectContent, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, blockClosedTypeahead, buttonVariants, reducer, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as React$1 from 'react';
4
- import { HTMLAttributes, ReactNode, ComponentPropsWithoutRef } from 'react';
4
+ import { HTMLAttributes, ReactNode, KeyboardEvent, ComponentPropsWithoutRef } from 'react';
5
5
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
6
6
  import { VariantProps } from 'class-variance-authority';
7
7
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
@@ -1513,7 +1513,7 @@ interface IconButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonEl
1513
1513
  *
1514
1514
  * [Icon Button documentation](https://equality.eqtylab.io/components/icon-button)
1515
1515
  */
1516
- declare function IconButton({ className, size, variant, name, label, href, target, download, disabled, ...props }: IconButtonProps): react_jsx_runtime.JSX.Element;
1516
+ declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
1517
1517
 
1518
1518
  declare const iconVariants: (props?: ({
1519
1519
  size?: "sm" | "md" | "lg" | "xs" | null | undefined;
@@ -1671,6 +1671,223 @@ interface MotionCollapsibleContentProps {
1671
1671
  */
1672
1672
  declare const MotionCollapsibleContent: ({ isOpen, children, className, }: MotionCollapsibleContentProps) => react_jsx_runtime.JSX.Element;
1673
1673
 
1674
+ type NavDrillRequest = 'drill' | 'back';
1675
+ interface NavDrillProps extends React$1.HTMLAttributes<HTMLDivElement> {
1676
+ /** Controlled: the `value` of the level on show */
1677
+ value?: string;
1678
+ /** Uncontrolled: the `value` of the first level */
1679
+ defaultValue?: string;
1680
+ /** Called when a drill row or ‹ asks for a level; a controlled caller sets `value` from it */
1681
+ onValueChange?: (value: string, request: NavDrillRequest) => void;
1682
+ /** Slides levels in and out after a drill row or ‹; off swaps them at once */
1683
+ animate?: boolean;
1684
+ }
1685
+ /**
1686
+ * **Props**
1687
+ * - `value?: string` — Controlled: the `value` of the level on show
1688
+ * - `defaultValue?: string` — Uncontrolled: the `value` of the first level
1689
+ * - `onValueChange?: (value: string, request: NavDrillRequest) => void` — Called when a drill row or ‹ asks for a level; a controlled caller sets `value` from it
1690
+ * - `animate?: boolean` (default `true`) — Slides levels in and out after a drill row or ‹; off swaps them at once
1691
+ *
1692
+ * Also accepts the standard `HTMLDivElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1693
+ */
1694
+ declare const NavDrill: React$1.ForwardRefExoticComponent<NavDrillProps & React$1.RefAttributes<HTMLDivElement>>;
1695
+ interface NavDrillLevelBaseProps extends React$1.HTMLAttributes<HTMLDivElement> {
1696
+ /** The `NavDrill` value that shows this level; must be a direct child of `NavDrill` */
1697
+ value: string;
1698
+ }
1699
+ interface NavDrillChildLevelProps extends NavDrillLevelBaseProps {
1700
+ /** The `value` ‹ returns to; draws the ‹ row at the top of the level */
1701
+ parent?: string;
1702
+ /** Names where you are, on the ‹ row */
1703
+ label: string;
1704
+ /** The ‹ row's accessible name; must start with `label` (WCAG 2.5.3). @default "{label}, back" */
1705
+ backLabel?: string;
1706
+ }
1707
+ interface NavDrillTopLevelProps extends NavDrillLevelBaseProps {
1708
+ parent?: undefined;
1709
+ label?: undefined;
1710
+ backLabel?: undefined;
1711
+ }
1712
+ type NavDrillLevelProps = NavDrillChildLevelProps | NavDrillTopLevelProps;
1713
+ /**
1714
+ * **Props**
1715
+ * - `value: string` — The `NavDrill` value that shows this level; must be a direct child of `NavDrill`
1716
+ * - `parent?: string` — The `value` ‹ returns to; draws the ‹ row at the top of the level
1717
+ * - `label?: string` — Names where you are, on the ‹ row
1718
+ * - `backLabel?: string` (default `"{label}, back"`) — The ‹ row's accessible name; must start with `label` (WCAG 2.5.3).
1719
+ *
1720
+ * Also accepts the standard `HTMLDivElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1721
+ */
1722
+ declare const NavDrillLevel: React$1.ForwardRefExoticComponent<NavDrillLevelProps & React$1.RefAttributes<HTMLDivElement>>;
1723
+
1724
+ type NavListProps = React$1.HTMLAttributes<HTMLDivElement>;
1725
+ /**
1726
+ * Accepts the standard `HTMLDivElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1727
+ */
1728
+ declare const NavList: React$1.ForwardRefExoticComponent<NavListProps & React$1.RefAttributes<HTMLDivElement>>;
1729
+ interface NavListGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
1730
+ /** Names the group's list; leave it out where a ‹ row already names what the rows belong to */
1731
+ label?: string;
1732
+ }
1733
+ /**
1734
+ * **Props**
1735
+ * - `label?: string` — Names the group's list; leave it out where a ‹ row already names what the rows belong to
1736
+ *
1737
+ * Also accepts the standard `HTMLDivElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1738
+ */
1739
+ declare const NavListGroup: React$1.ForwardRefExoticComponent<NavListGroupProps & React$1.RefAttributes<HTMLDivElement>>;
1740
+ interface NavListItemProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'prefix'>, Pick<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'rel' | 'download'> {
1741
+ /** The row's text, also its full title when it truncates */
1742
+ label: string;
1743
+ /** An icon before the label, on top-level rows only; hidden from screen readers */
1744
+ prefix?: React$1.ReactNode;
1745
+ /** Badges or marks after the label; screen readers read them as part of the row */
1746
+ suffix?: React$1.ReactNode;
1747
+ /** Marks the row as the page on show */
1748
+ current?: boolean;
1749
+ /** The `value` of the `NavDrillLevel` this row opens; adds the › caret */
1750
+ drill?: string;
1751
+ /** Renders the row as its only child, such as a router link */
1752
+ asChild?: boolean;
1753
+ }
1754
+ /**
1755
+ * **Props**
1756
+ * - `label: string` — The row's text, also its full title when it truncates
1757
+ * - `prefix?: React.ReactNode` — An icon before the label, on top-level rows only; hidden from screen readers
1758
+ * - `suffix?: React.ReactNode` — Badges or marks after the label; screen readers read them as part of the row
1759
+ * - `current?: boolean` (default `false`) — Marks the row as the page on show
1760
+ * - `drill?: string` — The `value` of the `NavDrillLevel` this row opens; adds the › caret
1761
+ * - `asChild?: boolean` (default `false`) — Renders the row as its only child, such as a router link
1762
+ *
1763
+ * Also accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1764
+ */
1765
+ declare const NavListItem: React$1.ForwardRefExoticComponent<NavListItemProps & React$1.RefAttributes<HTMLElement>>;
1766
+ /**
1767
+ * Accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1768
+ */
1769
+ declare const NavListSeparator: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
1770
+
1771
+ interface NavPanelProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'title'> {
1772
+ /** Names the panel's landmark */
1773
+ 'aria-label': string;
1774
+ /** Above the rows, such as a `NavSwitcher` or a heading */
1775
+ header?: React$1.ReactNode;
1776
+ }
1777
+ /**
1778
+ * **Props**
1779
+ * - `"aria-label": string` — Names the panel's landmark
1780
+ * - `header?: React.ReactNode` — Above the rows, such as a `NavSwitcher` or a heading
1781
+ *
1782
+ * Also accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1783
+ *
1784
+ * [Nav documentation](https://equality.eqtylab.io/components/nav)
1785
+ */
1786
+ declare const NavPanel: React$1.ForwardRefExoticComponent<NavPanelProps & React$1.RefAttributes<HTMLElement>>;
1787
+
1788
+ interface NavRailProps extends React$1.HTMLAttributes<HTMLElement> {
1789
+ /** Names the rail's landmark */
1790
+ 'aria-label': string;
1791
+ }
1792
+ /**
1793
+ * **Props**
1794
+ * - `"aria-label": string` — Names the rail's landmark
1795
+ *
1796
+ * Also accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1797
+ *
1798
+ * [Nav documentation](https://equality.eqtylab.io/components/nav)
1799
+ */
1800
+ declare const NavRail: React$1.ForwardRefExoticComponent<NavRailProps & React$1.RefAttributes<HTMLElement>>;
1801
+ interface NavRailItemBaseProps extends Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
1802
+ /** The item's only visible content; hidden from screen readers */
1803
+ icon: React$1.ReactNode;
1804
+ /** The item's accessible name and its tooltip */
1805
+ label: string;
1806
+ /** Marks the item as the section on show */
1807
+ current?: boolean;
1808
+ }
1809
+ interface NavRailItemLinkProps extends NavRailItemBaseProps {
1810
+ /** Where the item goes */
1811
+ href: string;
1812
+ asChild?: false;
1813
+ }
1814
+ interface NavRailItemSlotProps extends NavRailItemBaseProps {
1815
+ href?: string;
1816
+ /** Renders the item as its only child, such as a router link */
1817
+ asChild: true;
1818
+ }
1819
+ type NavRailItemProps = NavRailItemLinkProps | NavRailItemSlotProps;
1820
+ /**
1821
+ * **Props**
1822
+ * - `icon: React.ReactNode` — The item's only visible content; hidden from screen readers
1823
+ * - `label: string` — The item's accessible name and its tooltip
1824
+ * - `current?: boolean` (default `false`) — Marks the item as the section on show
1825
+ * - `href?: string` — Where the item goes
1826
+ * - `asChild?: false | true` (default `false`) — Renders the item as its only child, such as a router link
1827
+ *
1828
+ * Also accepts the standard `HTMLAnchorElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
1829
+ *
1830
+ * [Nav documentation](https://equality.eqtylab.io/components/nav)
1831
+ */
1832
+ declare const NavRailItem: React$1.ForwardRefExoticComponent<NavRailItemProps & React$1.RefAttributes<HTMLAnchorElement>>;
1833
+
1834
+ interface NavSwitcherOption {
1835
+ /** The option's value, passed to `onValueChange` */
1836
+ value: string;
1837
+ /** The option's name in the list */
1838
+ label: string;
1839
+ /** Matched by search as well as the label, for identifiers a user may know but never sees */
1840
+ keywords?: string[];
1841
+ }
1842
+ interface NavSwitcherAction {
1843
+ /** The action's link text */
1844
+ label: string;
1845
+ /** Runs once the list has closed */
1846
+ onSelect: () => void;
1847
+ }
1848
+ interface NavSwitcherLoadedProps {
1849
+ /** Shows a placeholder at the switcher's height while the current item loads */
1850
+ loading?: false;
1851
+ /** The current item's name, shown as the panel's heading */
1852
+ label: string;
1853
+ /** Singular and lowercase, for the trigger's name: "{label}, switch {noun}" */
1854
+ noun: string;
1855
+ /** Plural and lowercase, for the search and empty copy */
1856
+ collection: string;
1857
+ /** The items to switch between */
1858
+ options: NavSwitcherOption[];
1859
+ /** The current item's value */
1860
+ value: string;
1861
+ /** Called with the picked item's value */
1862
+ onValueChange: (value: string) => void;
1863
+ /** Hover or focus on an option, for a caller that warms its destination */
1864
+ onHighlight?: (value: string) => void;
1865
+ /** Hover or focus leaves an option */
1866
+ onHighlightEnd?: () => void;
1867
+ /** A command at the bottom of the list, kept while searching, such as "Create Project" */
1868
+ action?: NavSwitcherAction;
1869
+ }
1870
+ interface NavSwitcherLoadingProps {
1871
+ loading: true;
1872
+ }
1873
+ type NavSwitcherProps = NavSwitcherLoadedProps | NavSwitcherLoadingProps;
1874
+ /**
1875
+ * **Props**
1876
+ * - `loading?: false | true` — Shows a placeholder at the switcher's height while the current item loads
1877
+ * - `label?: string` — The current item's name, shown as the panel's heading
1878
+ * - `noun?: string` — Singular and lowercase, for the trigger's name: "{label}, switch {noun}"
1879
+ * - `collection?: string` — Plural and lowercase, for the search and empty copy
1880
+ * - `options?: NavSwitcherOption[]` — The items to switch between
1881
+ * - `value?: string` — The current item's value
1882
+ * - `onValueChange?: (value: string) => void` — Called with the picked item's value
1883
+ * - `onHighlight?: (value: string) => void` — Hover or focus on an option, for a caller that warms its destination
1884
+ * - `onHighlightEnd?: () => void` — Hover or focus leaves an option
1885
+ * - `action?: NavSwitcherAction` — A command at the bottom of the list, kept while searching, such as "Create Project"
1886
+ *
1887
+ * [Nav documentation](https://equality.eqtylab.io/components/nav)
1888
+ */
1889
+ declare const NavSwitcher: React$1.ForwardRefExoticComponent<NavSwitcherProps & React$1.RefAttributes<HTMLButtonElement>>;
1890
+
1674
1891
  interface NotFoundProps {
1675
1892
  className?: string;
1676
1893
  title?: string;
@@ -2229,6 +2446,8 @@ declare const SelectSeparator: React$1.ForwardRefExoticComponent<Omit<SelectPrim
2229
2446
  persistent?: boolean;
2230
2447
  } & React$1.RefAttributes<HTMLDivElement>>;
2231
2448
 
2449
+ declare const blockClosedTypeahead: (event: KeyboardEvent<HTMLButtonElement>) => void;
2450
+
2232
2451
  /**
2233
2452
  * **Props**
2234
2453
  * - `asChild?: boolean`
@@ -2958,4 +3177,4 @@ declare const CODE_BLOCK_ATTRIBUTE = "data-equality-code-block";
2958
3177
  */
2959
3178
  declare const scheduleHighlight: (root?: Node) => Promise<void>;
2960
3179
 
2961
- export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, CODE_BLOCK_ATTRIBUTE, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, type SegmentedControlOption, type SegmentedControlVariant, SegmentedControls, type SegmentedControlsDisplay, type SegmentedControlsProps, type SegmentedControlsSize, Select, SelectContent, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
3180
+ export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, CODE_BLOCK_ATTRIBUTE, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NavDrill, NavDrillLevel, type NavDrillLevelProps, type NavDrillProps, type NavDrillRequest, NavList, NavListGroup, type NavListGroupProps, NavListItem, type NavListItemProps, type NavListProps, NavListSeparator, NavPanel, type NavPanelProps, NavRail, NavRailItem, type NavRailItemProps, type NavRailProps, NavSwitcher, type NavSwitcherAction, type NavSwitcherOption, type NavSwitcherProps, NotFound, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, type SegmentedControlOption, type SegmentedControlVariant, SegmentedControls, type SegmentedControlsDisplay, type SegmentedControlsProps, type SegmentedControlsSize, Select, SelectContent, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, blockClosedTypeahead, buttonVariants, reducer, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };