@backstage/ui 0.13.0-next.2 → 0.13.1
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/CHANGELOG.md +255 -0
- package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
- package/dist/components/Button/Button.module.css.esm.js +2 -2
- package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +2 -2
- package/dist/components/ButtonLink/ButtonLink.esm.js +2 -3
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +2 -2
- package/dist/components/Card/Card.esm.js +1 -1
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Card/Card.module.css.esm.js +2 -2
- package/dist/components/Checkbox/Checkbox.esm.js +12 -3
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
- package/dist/components/Checkbox/definition.esm.js +0 -2
- package/dist/components/Checkbox/definition.esm.js.map +1 -1
- package/dist/components/Container/Container.module.css.esm.js +2 -2
- package/dist/components/Dialog/Dialog.esm.js +3 -1
- package/dist/components/Dialog/Dialog.esm.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
- package/dist/components/Header/Header.module.css.esm.js +2 -2
- package/dist/components/Header/definition.esm.js +5 -5
- package/dist/components/Header/definition.esm.js.map +1 -1
- package/dist/components/Link/Link.esm.js +1 -2
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/List/List.esm.js +70 -0
- package/dist/components/List/List.esm.js.map +1 -0
- package/dist/components/List/List.module.css.esm.js +8 -0
- package/dist/components/List/List.module.css.esm.js.map +1 -0
- package/dist/components/List/definition.esm.js +44 -0
- package/dist/components/List/definition.esm.js.map +1 -0
- package/dist/components/Menu/Menu.esm.js +5 -7
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/Menu/Menu.module.css.esm.js +2 -2
- package/dist/components/PluginHeader/PluginHeader.esm.js +38 -8
- package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
- package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js +164 -0
- package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -0
- package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js +8 -0
- package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js.map +1 -0
- package/dist/components/SearchAutocomplete/definition.esm.js +53 -0
- package/dist/components/SearchAutocomplete/definition.esm.js.map +1 -0
- package/dist/components/Select/Select.module.css.esm.js +2 -2
- package/dist/components/Table/Table.module.css.esm.js +2 -2
- package/dist/components/Table/components/Row.esm.js +21 -9
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js +80 -68
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBodySkeleton.esm.js +33 -0
- package/dist/components/Table/components/TableBodySkeleton.esm.js.map +1 -0
- package/dist/components/Table/components/TableHeader.esm.js +2 -2
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/Table/components/TableRoot.esm.js +1 -1
- package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
- package/dist/components/Table/definition.esm.js +14 -2
- package/dist/components/Table/definition.esm.js.map +1 -1
- package/dist/components/Table/hooks/useCompletePagination.esm.js +14 -6
- package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.esm.js +3 -5
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +2 -5
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js +2 -2
- package/dist/css/styles.css +4 -3
- package/dist/index.d.ts +338 -41
- package/dist/index.esm.js +5 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/provider/BUIProvider.esm.js +28 -0
- package/dist/provider/BUIProvider.esm.js.map +1 -0
- package/dist/utils/{isExternalLink.esm.js → linkUtils.esm.js} +5 -2
- package/dist/utils/linkUtils.esm.js.map +1 -0
- package/package.json +4 -4
- package/dist/analytics/BUIProvider.esm.js +0 -18
- package/dist/analytics/BUIProvider.esm.js.map +0 -1
- package/dist/components/InternalLinkProvider/InternalLinkProvider.esm.js +0 -55
- package/dist/components/InternalLinkProvider/InternalLinkProvider.esm.js.map +0 -1
- package/dist/utils/isExternalLink.esm.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties, HTMLAttributes, ComponentPropsWithoutRef, ReactElement, ElementType, ComponentPropsWithRef, ComponentProps } from 'react';
|
|
3
|
-
import { DisclosureProps, HeadingProps, DisclosurePanelProps, DisclosureGroupProps, ButtonProps as ButtonProps$1, DialogTriggerProps as DialogTriggerProps$1, ModalOverlayProps, TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1, LinkProps as LinkProps$1, CheckboxProps as CheckboxProps$1, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, TableProps as TableProps$1, TableHeaderProps as TableHeaderProps$1, TableBodyProps as TableBodyProps$1, ColumnProps as ColumnProps$1, RowProps as RowProps$1, CellProps as CellProps$1, TagListProps, TagGroupProps as TagGroupProps$1, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, MenuTriggerProps as MenuTriggerProps$1, SubmenuTriggerProps as SubmenuTriggerProps$1, PopoverProps as PopoverProps$1, MenuProps as MenuProps$1, ListBoxProps, MenuItemProps as MenuItemProps$1, ListBoxItemProps, MenuSectionProps as MenuSectionProps$1, SeparatorProps, SearchFieldProps as SearchFieldProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1 } from 'react-aria-components';
|
|
3
|
+
import { DisclosureProps, HeadingProps, DisclosurePanelProps, DisclosureGroupProps, ButtonProps as ButtonProps$1, DialogTriggerProps as DialogTriggerProps$1, ModalOverlayProps, TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1, LinkProps as LinkProps$1, CheckboxProps as CheckboxProps$1, RadioGroupProps as RadioGroupProps$1, RadioProps as RadioProps$1, TableProps as TableProps$1, TableHeaderProps as TableHeaderProps$1, TableBodyProps as TableBodyProps$1, ColumnProps as ColumnProps$1, RowProps as RowProps$1, CellProps as CellProps$1, TagListProps, TagGroupProps as TagGroupProps$1, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, MenuTriggerProps as MenuTriggerProps$1, SubmenuTriggerProps as SubmenuTriggerProps$1, PopoverProps as PopoverProps$1, MenuProps as MenuProps$1, ListBoxProps, MenuItemProps as MenuItemProps$1, ListBoxItemProps, MenuSectionProps as MenuSectionProps$1, SeparatorProps, SearchFieldProps as SearchFieldProps$1, GridListProps, GridListItemProps, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1 } from 'react-aria-components';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { NavigateOptions } from 'react-router-dom';
|
|
6
6
|
import { SortDescriptor as SortDescriptor$1 } from 'react-stately';
|
|
@@ -1389,11 +1389,11 @@ declare const HeaderDefinition: {
|
|
|
1389
1389
|
readonly [key: string]: string;
|
|
1390
1390
|
};
|
|
1391
1391
|
readonly classNames: {
|
|
1392
|
-
readonly root: "bui-
|
|
1393
|
-
readonly content: "bui-
|
|
1394
|
-
readonly breadcrumbs: "bui-
|
|
1395
|
-
readonly tabsWrapper: "bui-
|
|
1396
|
-
readonly controls: "bui-
|
|
1392
|
+
readonly root: "bui-Header";
|
|
1393
|
+
readonly content: "bui-HeaderContent";
|
|
1394
|
+
readonly breadcrumbs: "bui-HeaderBreadcrumbs";
|
|
1395
|
+
readonly tabsWrapper: "bui-HeaderTabsWrapper";
|
|
1396
|
+
readonly controls: "bui-HeaderControls";
|
|
1397
1397
|
};
|
|
1398
1398
|
readonly propDefs: {
|
|
1399
1399
|
readonly title: {};
|
|
@@ -1412,11 +1412,11 @@ declare const HeaderPageDefinition: {
|
|
|
1412
1412
|
readonly [key: string]: string;
|
|
1413
1413
|
};
|
|
1414
1414
|
readonly classNames: {
|
|
1415
|
-
readonly root: "bui-
|
|
1416
|
-
readonly content: "bui-
|
|
1417
|
-
readonly breadcrumbs: "bui-
|
|
1418
|
-
readonly tabsWrapper: "bui-
|
|
1419
|
-
readonly controls: "bui-
|
|
1415
|
+
readonly root: "bui-Header";
|
|
1416
|
+
readonly content: "bui-HeaderContent";
|
|
1417
|
+
readonly breadcrumbs: "bui-HeaderBreadcrumbs";
|
|
1418
|
+
readonly tabsWrapper: "bui-HeaderTabsWrapper";
|
|
1419
|
+
readonly controls: "bui-HeaderControls";
|
|
1420
1420
|
};
|
|
1421
1421
|
readonly propDefs: {
|
|
1422
1422
|
readonly title: {};
|
|
@@ -1531,9 +1531,7 @@ declare const ButtonLinkDefinition: {
|
|
|
1531
1531
|
|
|
1532
1532
|
/** @public */
|
|
1533
1533
|
type CheckboxOwnProps = {
|
|
1534
|
-
|
|
1535
|
-
indeterminate?: boolean;
|
|
1536
|
-
children: React.ReactNode;
|
|
1534
|
+
children?: React.ReactNode;
|
|
1537
1535
|
className?: string;
|
|
1538
1536
|
};
|
|
1539
1537
|
/** @public */
|
|
@@ -1556,12 +1554,6 @@ declare const CheckboxDefinition: {
|
|
|
1556
1554
|
readonly indicator: "bui-CheckboxIndicator";
|
|
1557
1555
|
};
|
|
1558
1556
|
readonly propDefs: {
|
|
1559
|
-
readonly selected: {
|
|
1560
|
-
readonly dataAttribute: true;
|
|
1561
|
-
};
|
|
1562
|
-
readonly indeterminate: {
|
|
1563
|
-
readonly dataAttribute: true;
|
|
1564
|
-
};
|
|
1565
1557
|
readonly children: {};
|
|
1566
1558
|
readonly className: {};
|
|
1567
1559
|
};
|
|
@@ -1708,6 +1700,7 @@ interface SortState {
|
|
|
1708
1700
|
/** @public */
|
|
1709
1701
|
type TableRootOwnProps = {
|
|
1710
1702
|
stale?: boolean;
|
|
1703
|
+
loading?: boolean;
|
|
1711
1704
|
};
|
|
1712
1705
|
/** @public */
|
|
1713
1706
|
interface TableRootProps extends TableRootOwnProps, Omit<TableProps$1, keyof TableRootOwnProps> {
|
|
@@ -1743,14 +1736,32 @@ type ColumnOwnProps = {
|
|
|
1743
1736
|
/** @public */
|
|
1744
1737
|
interface ColumnProps extends ColumnOwnProps, Omit<ColumnProps$1, keyof ColumnOwnProps> {
|
|
1745
1738
|
}
|
|
1746
|
-
/**
|
|
1739
|
+
/**
|
|
1740
|
+
* Own props for the {@link Cell} component.
|
|
1741
|
+
*
|
|
1742
|
+
* @public
|
|
1743
|
+
*/
|
|
1747
1744
|
type CellOwnProps = {
|
|
1748
1745
|
className?: string;
|
|
1749
1746
|
};
|
|
1750
|
-
/**
|
|
1747
|
+
/**
|
|
1748
|
+
* Props for the {@link Cell} component.
|
|
1749
|
+
*
|
|
1750
|
+
* `Cell` is a generic cell wrapper for custom cell content. When rendering
|
|
1751
|
+
* cells via {@link ColumnConfig.cell} or a custom {@link RowRenderFn}, the
|
|
1752
|
+
* returned element **must** be a cell component (`Cell`, `CellText`, or
|
|
1753
|
+
* `CellProfile`) at the top level. Returning bare text or other elements
|
|
1754
|
+
* without a cell wrapper will break the table layout.
|
|
1755
|
+
*
|
|
1756
|
+
* @public
|
|
1757
|
+
*/
|
|
1751
1758
|
interface CellProps extends CellOwnProps, Omit<CellProps$1, keyof CellOwnProps> {
|
|
1752
1759
|
}
|
|
1753
|
-
/**
|
|
1760
|
+
/**
|
|
1761
|
+
* Own props for the {@link CellText} component.
|
|
1762
|
+
*
|
|
1763
|
+
* @public
|
|
1764
|
+
*/
|
|
1754
1765
|
type CellTextOwnProps = {
|
|
1755
1766
|
title: string;
|
|
1756
1767
|
description?: string;
|
|
@@ -1759,10 +1770,23 @@ type CellTextOwnProps = {
|
|
|
1759
1770
|
href?: string;
|
|
1760
1771
|
className?: string;
|
|
1761
1772
|
};
|
|
1762
|
-
/**
|
|
1773
|
+
/**
|
|
1774
|
+
* Props for the {@link CellText} component.
|
|
1775
|
+
*
|
|
1776
|
+
* `CellText` renders a table cell with a title and optional description. It
|
|
1777
|
+
* is one of the cell components (`Cell`, `CellText`, `CellProfile`) that
|
|
1778
|
+
* **must** be used as the top-level element returned from
|
|
1779
|
+
* {@link ColumnConfig.cell} or a custom {@link RowRenderFn}.
|
|
1780
|
+
*
|
|
1781
|
+
* @public
|
|
1782
|
+
*/
|
|
1763
1783
|
interface CellTextProps extends CellTextOwnProps, Omit<CellProps$1, keyof CellTextOwnProps> {
|
|
1764
1784
|
}
|
|
1765
|
-
/**
|
|
1785
|
+
/**
|
|
1786
|
+
* Own props for the {@link CellProfile} component.
|
|
1787
|
+
*
|
|
1788
|
+
* @public
|
|
1789
|
+
*/
|
|
1766
1790
|
type CellProfileOwnProps = {
|
|
1767
1791
|
src?: string;
|
|
1768
1792
|
name?: string;
|
|
@@ -1771,7 +1795,16 @@ type CellProfileOwnProps = {
|
|
|
1771
1795
|
color?: TextColors;
|
|
1772
1796
|
className?: string;
|
|
1773
1797
|
};
|
|
1774
|
-
/**
|
|
1798
|
+
/**
|
|
1799
|
+
* Props for the {@link CellProfile} component.
|
|
1800
|
+
*
|
|
1801
|
+
* `CellProfile` renders a table cell with an avatar, name, and optional
|
|
1802
|
+
* description. It is one of the cell components (`Cell`, `CellText`,
|
|
1803
|
+
* `CellProfile`) that **must** be used as the top-level element returned
|
|
1804
|
+
* from {@link ColumnConfig.cell} or a custom {@link RowRenderFn}.
|
|
1805
|
+
*
|
|
1806
|
+
* @public
|
|
1807
|
+
*/
|
|
1775
1808
|
interface CellProfileProps extends CellProfileOwnProps, Omit<CellProps$1, keyof CellProfileOwnProps> {
|
|
1776
1809
|
}
|
|
1777
1810
|
/** @public */
|
|
@@ -1788,10 +1821,27 @@ interface PagePagination extends TablePaginationProps {
|
|
|
1788
1821
|
}
|
|
1789
1822
|
/** @public */
|
|
1790
1823
|
type TablePaginationType = NoPagination | PagePagination;
|
|
1791
|
-
/**
|
|
1824
|
+
/**
|
|
1825
|
+
* Configuration for a single table column.
|
|
1826
|
+
*
|
|
1827
|
+
* @public
|
|
1828
|
+
*/
|
|
1792
1829
|
interface ColumnConfig<T extends TableItem> {
|
|
1793
1830
|
id: string;
|
|
1794
1831
|
label: string;
|
|
1832
|
+
/**
|
|
1833
|
+
* Renders the cell content for this column.
|
|
1834
|
+
*
|
|
1835
|
+
* **Important:** The returned element **must** be a cell component at the
|
|
1836
|
+
* top level — either `Cell`, `CellText`, or `CellProfile`. Returning bare
|
|
1837
|
+
* text, fragments, or other elements without a cell wrapper will break the
|
|
1838
|
+
* table layout.
|
|
1839
|
+
*
|
|
1840
|
+
* @example
|
|
1841
|
+
* ```tsx
|
|
1842
|
+
* cell: item => <CellText title={item.name} />
|
|
1843
|
+
* ```
|
|
1844
|
+
*/
|
|
1795
1845
|
cell: (item: T) => ReactElement;
|
|
1796
1846
|
header?: () => ReactElement;
|
|
1797
1847
|
isSortable?: boolean;
|
|
@@ -1808,7 +1858,16 @@ interface RowConfig<T extends TableItem> {
|
|
|
1808
1858
|
onClick?: (item: T) => void;
|
|
1809
1859
|
getIsDisabled?: (item: T) => boolean;
|
|
1810
1860
|
}
|
|
1811
|
-
/**
|
|
1861
|
+
/**
|
|
1862
|
+
* Custom render function for table rows.
|
|
1863
|
+
*
|
|
1864
|
+
* When using a custom row render function, each cell rendered inside the row
|
|
1865
|
+
* **must** use a cell component (`Cell`, `CellText`, or `CellProfile`) as
|
|
1866
|
+
* the top-level element. Returning bare text or other elements without a
|
|
1867
|
+
* cell wrapper will break the table layout.
|
|
1868
|
+
*
|
|
1869
|
+
* @public
|
|
1870
|
+
*/
|
|
1812
1871
|
type RowRenderFn<T extends TableItem> = (params: {
|
|
1813
1872
|
item: T;
|
|
1814
1873
|
index: number;
|
|
@@ -1821,6 +1880,12 @@ interface TableSelection {
|
|
|
1821
1880
|
onSelectionChange?: TableProps$1['onSelectionChange'];
|
|
1822
1881
|
}
|
|
1823
1882
|
/** @public */
|
|
1883
|
+
type VirtualizedProp = boolean | {
|
|
1884
|
+
rowHeight: number;
|
|
1885
|
+
} | {
|
|
1886
|
+
estimatedRowHeight: number;
|
|
1887
|
+
};
|
|
1888
|
+
/** @public */
|
|
1824
1889
|
interface TableProps<T extends TableItem> {
|
|
1825
1890
|
columnConfig: readonly ColumnConfig<T>[];
|
|
1826
1891
|
data: T[] | undefined;
|
|
@@ -1834,10 +1899,11 @@ interface TableProps<T extends TableItem> {
|
|
|
1834
1899
|
emptyState?: ReactNode;
|
|
1835
1900
|
className?: string;
|
|
1836
1901
|
style?: React.CSSProperties;
|
|
1902
|
+
virtualized?: VirtualizedProp;
|
|
1837
1903
|
}
|
|
1838
1904
|
|
|
1839
1905
|
/** @public */
|
|
1840
|
-
declare function Table<T extends TableItem>({ columnConfig, data, loading, isStale, error, pagination, sort, rowConfig, selection, emptyState, className, style, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1906
|
+
declare function Table<T extends TableItem>({ columnConfig, data, loading, isStale, error, pagination, sort, rowConfig, selection, emptyState, className, style, virtualized, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1841
1907
|
|
|
1842
1908
|
/** @public */
|
|
1843
1909
|
declare const TableRoot: (props: TableRootProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1979,6 +2045,9 @@ declare const TableDefinition: {
|
|
|
1979
2045
|
readonly stale: {
|
|
1980
2046
|
readonly dataAttribute: true;
|
|
1981
2047
|
};
|
|
2048
|
+
readonly loading: {
|
|
2049
|
+
readonly dataAttribute: true;
|
|
2050
|
+
};
|
|
1982
2051
|
};
|
|
1983
2052
|
};
|
|
1984
2053
|
|
|
@@ -2480,6 +2549,118 @@ declare const PopoverDefinition: {
|
|
|
2480
2549
|
};
|
|
2481
2550
|
};
|
|
2482
2551
|
|
|
2552
|
+
/** @public */
|
|
2553
|
+
type SearchAutocompleteOwnProps = {
|
|
2554
|
+
/**
|
|
2555
|
+
* The current value of the search input (controlled).
|
|
2556
|
+
*/
|
|
2557
|
+
inputValue?: string;
|
|
2558
|
+
/**
|
|
2559
|
+
* Handler called when the search input value changes.
|
|
2560
|
+
*/
|
|
2561
|
+
onInputChange?: (value: string) => void;
|
|
2562
|
+
/**
|
|
2563
|
+
* The size of the search input.
|
|
2564
|
+
* @defaultValue 'small'
|
|
2565
|
+
*/
|
|
2566
|
+
size?: 'small' | 'medium' | Partial<Record<Breakpoint, 'small' | 'medium'>>;
|
|
2567
|
+
/**
|
|
2568
|
+
* Accessible label for the search input.
|
|
2569
|
+
*/
|
|
2570
|
+
'aria-label'?: string;
|
|
2571
|
+
/**
|
|
2572
|
+
* ID of the element that labels the search input.
|
|
2573
|
+
*/
|
|
2574
|
+
'aria-labelledby'?: string;
|
|
2575
|
+
/**
|
|
2576
|
+
* The placeholder text for the search input.
|
|
2577
|
+
*/
|
|
2578
|
+
placeholder?: string;
|
|
2579
|
+
/**
|
|
2580
|
+
* Width of the results popover. Accepts any CSS width value.
|
|
2581
|
+
* When not set, the popover matches the input width.
|
|
2582
|
+
*/
|
|
2583
|
+
popoverWidth?: string;
|
|
2584
|
+
/**
|
|
2585
|
+
* Placement of the results popover relative to the input.
|
|
2586
|
+
* @defaultValue 'bottom start'
|
|
2587
|
+
*/
|
|
2588
|
+
popoverPlacement?: PopoverProps$1['placement'];
|
|
2589
|
+
/**
|
|
2590
|
+
* The result items to render inside the autocomplete.
|
|
2591
|
+
*/
|
|
2592
|
+
children?: ReactNode;
|
|
2593
|
+
/**
|
|
2594
|
+
* Whether results are currently loading.
|
|
2595
|
+
* When true, displays a loading indicator and announces the loading state to screen readers.
|
|
2596
|
+
*/
|
|
2597
|
+
isLoading?: boolean;
|
|
2598
|
+
/**
|
|
2599
|
+
* Whether the results popover is open by default.
|
|
2600
|
+
*/
|
|
2601
|
+
defaultOpen?: boolean;
|
|
2602
|
+
className?: string;
|
|
2603
|
+
style?: React.CSSProperties;
|
|
2604
|
+
};
|
|
2605
|
+
/** @public */
|
|
2606
|
+
interface SearchAutocompleteProps extends SearchAutocompleteOwnProps {
|
|
2607
|
+
}
|
|
2608
|
+
/** @public */
|
|
2609
|
+
type SearchAutocompleteItemOwnProps = {
|
|
2610
|
+
children: ReactNode;
|
|
2611
|
+
className?: string;
|
|
2612
|
+
};
|
|
2613
|
+
/** @public */
|
|
2614
|
+
interface SearchAutocompleteItemProps extends SearchAutocompleteItemOwnProps, Omit<ListBoxItemProps, keyof SearchAutocompleteItemOwnProps> {
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
/** @public */
|
|
2618
|
+
declare function SearchAutocomplete(props: SearchAutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
2619
|
+
/** @public */
|
|
2620
|
+
declare function SearchAutocompleteItem(props: SearchAutocompleteItemProps): react_jsx_runtime.JSX.Element;
|
|
2621
|
+
|
|
2622
|
+
/**
|
|
2623
|
+
* Component definition for SearchAutocomplete.
|
|
2624
|
+
* @public
|
|
2625
|
+
*/
|
|
2626
|
+
declare const SearchAutocompleteDefinition: {
|
|
2627
|
+
readonly styles: {
|
|
2628
|
+
readonly [key: string]: string;
|
|
2629
|
+
};
|
|
2630
|
+
readonly bg: "consumer";
|
|
2631
|
+
readonly classNames: {
|
|
2632
|
+
readonly root: "bui-SearchAutocomplete";
|
|
2633
|
+
readonly searchField: "bui-SearchAutocompleteSearchField";
|
|
2634
|
+
readonly searchFieldInput: "bui-SearchAutocompleteInput";
|
|
2635
|
+
readonly searchFieldClear: "bui-SearchAutocompleteClear";
|
|
2636
|
+
readonly popover: "bui-SearchAutocompletePopover";
|
|
2637
|
+
readonly inner: "bui-SearchAutocompleteInner";
|
|
2638
|
+
readonly listBox: "bui-SearchAutocompleteListBox";
|
|
2639
|
+
readonly loadingState: "bui-SearchAutocompleteLoadingState";
|
|
2640
|
+
readonly emptyState: "bui-SearchAutocompleteEmptyState";
|
|
2641
|
+
};
|
|
2642
|
+
readonly propDefs: {
|
|
2643
|
+
readonly 'aria-label': {};
|
|
2644
|
+
readonly 'aria-labelledby': {};
|
|
2645
|
+
readonly size: {
|
|
2646
|
+
readonly dataAttribute: true;
|
|
2647
|
+
readonly default: "small";
|
|
2648
|
+
};
|
|
2649
|
+
readonly placeholder: {
|
|
2650
|
+
readonly default: "Search";
|
|
2651
|
+
};
|
|
2652
|
+
readonly inputValue: {};
|
|
2653
|
+
readonly onInputChange: {};
|
|
2654
|
+
readonly popoverWidth: {};
|
|
2655
|
+
readonly popoverPlacement: {};
|
|
2656
|
+
readonly children: {};
|
|
2657
|
+
readonly isLoading: {};
|
|
2658
|
+
readonly defaultOpen: {};
|
|
2659
|
+
readonly className: {};
|
|
2660
|
+
readonly style: {};
|
|
2661
|
+
};
|
|
2662
|
+
};
|
|
2663
|
+
|
|
2483
2664
|
/** @public */
|
|
2484
2665
|
type SearchFieldOwnProps = {
|
|
2485
2666
|
/**
|
|
@@ -2604,6 +2785,122 @@ declare const LinkDefinition: {
|
|
|
2604
2785
|
};
|
|
2605
2786
|
};
|
|
2606
2787
|
|
|
2788
|
+
/**
|
|
2789
|
+
* Own props for the List component.
|
|
2790
|
+
*
|
|
2791
|
+
* @public
|
|
2792
|
+
*/
|
|
2793
|
+
type ListOwnProps<T = object> = {
|
|
2794
|
+
items?: GridListProps<T>['items'];
|
|
2795
|
+
children?: GridListProps<T>['children'];
|
|
2796
|
+
renderEmptyState?: GridListProps<T>['renderEmptyState'];
|
|
2797
|
+
className?: string;
|
|
2798
|
+
};
|
|
2799
|
+
/**
|
|
2800
|
+
* Props for the List component.
|
|
2801
|
+
*
|
|
2802
|
+
* @public
|
|
2803
|
+
*/
|
|
2804
|
+
interface ListProps<T> extends ListOwnProps<T>, Omit<GridListProps<T>, keyof ListOwnProps<T>> {
|
|
2805
|
+
}
|
|
2806
|
+
/**
|
|
2807
|
+
* Own props for the ListRow component.
|
|
2808
|
+
*
|
|
2809
|
+
* @public
|
|
2810
|
+
*/
|
|
2811
|
+
type ListRowOwnProps = {
|
|
2812
|
+
/**
|
|
2813
|
+
* The main label content of the row.
|
|
2814
|
+
*/
|
|
2815
|
+
children?: React.ReactNode;
|
|
2816
|
+
/**
|
|
2817
|
+
* Optional secondary description text.
|
|
2818
|
+
*/
|
|
2819
|
+
description?: string;
|
|
2820
|
+
/**
|
|
2821
|
+
* Optional icon displayed before the label, rendered in a 32×32px box.
|
|
2822
|
+
*/
|
|
2823
|
+
icon?: React.ReactElement;
|
|
2824
|
+
/**
|
|
2825
|
+
* Optional menu items rendered inside an automatically managed dropdown menu.
|
|
2826
|
+
* Pass `MenuItem` nodes here and the component will render the trigger button
|
|
2827
|
+
* and menu wrapper for you.
|
|
2828
|
+
*/
|
|
2829
|
+
menuItems?: React.ReactNode;
|
|
2830
|
+
/**
|
|
2831
|
+
* Optional actions rendered in a flex row on the right side of the row,
|
|
2832
|
+
* e.g. a set of tags. For a dropdown menu, prefer `menuItems`.
|
|
2833
|
+
*/
|
|
2834
|
+
customActions?: React.ReactNode;
|
|
2835
|
+
className?: string;
|
|
2836
|
+
};
|
|
2837
|
+
/**
|
|
2838
|
+
* Props for the ListRow component.
|
|
2839
|
+
*
|
|
2840
|
+
* @public
|
|
2841
|
+
*/
|
|
2842
|
+
interface ListRowProps extends ListRowOwnProps, Omit<GridListItemProps, keyof ListRowOwnProps> {
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
/**
|
|
2846
|
+
* A list displays a list of interactive rows with support for keyboard
|
|
2847
|
+
* navigation, single or multiple selection, and row actions.
|
|
2848
|
+
*
|
|
2849
|
+
* @public
|
|
2850
|
+
*/
|
|
2851
|
+
declare const List: <T extends object>(props: ListProps<T>) => react_jsx_runtime.JSX.Element;
|
|
2852
|
+
/**
|
|
2853
|
+
* A row within a List.
|
|
2854
|
+
*
|
|
2855
|
+
* @public
|
|
2856
|
+
*/
|
|
2857
|
+
declare const ListRow: (props: ListRowProps) => react_jsx_runtime.JSX.Element;
|
|
2858
|
+
|
|
2859
|
+
/**
|
|
2860
|
+
* Component definition for List
|
|
2861
|
+
* @public
|
|
2862
|
+
*/
|
|
2863
|
+
declare const ListDefinition: {
|
|
2864
|
+
readonly styles: {
|
|
2865
|
+
readonly [key: string]: string;
|
|
2866
|
+
};
|
|
2867
|
+
readonly classNames: {
|
|
2868
|
+
readonly root: "bui-List";
|
|
2869
|
+
};
|
|
2870
|
+
readonly propDefs: {
|
|
2871
|
+
readonly items: {};
|
|
2872
|
+
readonly children: {};
|
|
2873
|
+
readonly renderEmptyState: {};
|
|
2874
|
+
readonly className: {};
|
|
2875
|
+
};
|
|
2876
|
+
};
|
|
2877
|
+
/**
|
|
2878
|
+
* Component definition for ListRow
|
|
2879
|
+
* @public
|
|
2880
|
+
*/
|
|
2881
|
+
declare const ListRowDefinition: {
|
|
2882
|
+
readonly styles: {
|
|
2883
|
+
readonly [key: string]: string;
|
|
2884
|
+
};
|
|
2885
|
+
readonly bg: "consumer";
|
|
2886
|
+
readonly classNames: {
|
|
2887
|
+
readonly root: "bui-ListRow";
|
|
2888
|
+
readonly check: "bui-ListRowCheck";
|
|
2889
|
+
readonly icon: "bui-ListRowIcon";
|
|
2890
|
+
readonly label: "bui-ListRowLabel";
|
|
2891
|
+
readonly description: "bui-ListRowDescription";
|
|
2892
|
+
readonly actions: "bui-ListRowActions";
|
|
2893
|
+
};
|
|
2894
|
+
readonly propDefs: {
|
|
2895
|
+
readonly children: {};
|
|
2896
|
+
readonly description: {};
|
|
2897
|
+
readonly icon: {};
|
|
2898
|
+
readonly menuItems: {};
|
|
2899
|
+
readonly customActions: {};
|
|
2900
|
+
readonly className: {};
|
|
2901
|
+
};
|
|
2902
|
+
};
|
|
2903
|
+
|
|
2607
2904
|
/** @public */
|
|
2608
2905
|
type Option = {
|
|
2609
2906
|
value: string;
|
|
@@ -2958,16 +3255,6 @@ type AnalyticsTracker = {
|
|
|
2958
3255
|
*/
|
|
2959
3256
|
type UseAnalyticsFn = () => AnalyticsTracker;
|
|
2960
3257
|
|
|
2961
|
-
/**
|
|
2962
|
-
* Returns an AnalyticsTracker for capturing analytics events.
|
|
2963
|
-
*
|
|
2964
|
-
* By default returns a noop tracker. When a `BUIProvider` is present
|
|
2965
|
-
* in the tree, returns the tracker provided by the consumer's hook.
|
|
2966
|
-
*
|
|
2967
|
-
* @public
|
|
2968
|
-
*/
|
|
2969
|
-
declare function useAnalytics(): AnalyticsTracker;
|
|
2970
|
-
|
|
2971
3258
|
/** @public */
|
|
2972
3259
|
type BUIProviderProps = {
|
|
2973
3260
|
useAnalytics?: UseAnalyticsFn;
|
|
@@ -2994,6 +3281,16 @@ type BUIProviderProps = {
|
|
|
2994
3281
|
*/
|
|
2995
3282
|
declare function BUIProvider(props: BUIProviderProps): react_jsx_runtime.JSX.Element;
|
|
2996
3283
|
|
|
3284
|
+
/**
|
|
3285
|
+
* Returns an AnalyticsTracker for capturing analytics events.
|
|
3286
|
+
*
|
|
3287
|
+
* By default returns a noop tracker. When a `BUIProvider` is present
|
|
3288
|
+
* in the tree, returns the tracker provided by the consumer's hook.
|
|
3289
|
+
*
|
|
3290
|
+
* @public
|
|
3291
|
+
*/
|
|
3292
|
+
declare function useAnalytics(): AnalyticsTracker;
|
|
3293
|
+
|
|
2997
3294
|
/**
|
|
2998
3295
|
* Recursively extracts text content from a React node tree.
|
|
2999
3296
|
* Returns undefined if no text content is found (e.g. icon-only children
|
|
@@ -3003,5 +3300,5 @@ declare function BUIProvider(props: BUIProviderProps): react_jsx_runtime.JSX.Ele
|
|
|
3003
3300
|
*/
|
|
3004
3301
|
declare function getNodeText(node: ReactNode | ((...args: any[]) => ReactNode)): string | undefined;
|
|
3005
3302
|
|
|
3006
|
-
export { Accordion, AccordionDefinition, AccordionGroup, AccordionGroupDefinition, AccordionPanel, AccordionPanelDefinition, AccordionTrigger, AccordionTriggerDefinition, Alert, AlertDefinition, Avatar, AvatarDefinition, BUIProvider, BgProvider, Box, BoxDefinition, Button, ButtonDefinition, ButtonIcon, ButtonIconDefinition, ButtonLink, ButtonLinkDefinition, Card, CardBody, CardBodyDefinition, CardDefinition, CardFooter, CardFooterDefinition, CardHeader, CardHeaderDefinition, Cell, CellProfile, CellText, Checkbox, CheckboxDefinition, Column, Container, ContainerDefinition, Dialog, DialogBody, DialogBodyDefinition, DialogDefinition, DialogFooter, DialogFooterDefinition, DialogHeader, DialogHeaderDefinition, DialogTrigger, FieldLabel, FieldLabelDefinition, Flex, FlexDefinition, FullPage, FullPageDefinition, Grid, GridDefinition, GridItemDefinition, Header, HeaderDefinition, HeaderPage, HeaderPageDefinition, Link, LinkDefinition, Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuDefinition, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, PasswordField, PasswordFieldDefinition, PluginHeader, PluginHeaderDefinition, Popover, PopoverDefinition, Radio, RadioDefinition, RadioGroup, RadioGroupDefinition, Row, SearchField, SearchFieldDefinition, Select, SelectDefinition, Skeleton, SkeletonDefinition, SubmenuTrigger, Switch, SwitchDefinition, Tab, TabList, TabPanel, Table, TableBody, TableDefinition, TableHeader, TablePagination, TablePaginationDefinition, TableRoot, Tabs, TabsDefinition, Tag, TagGroup, TagGroupDefinition, Text, TextDefinition, TextField, TextFieldDefinition, ToggleButton, ToggleButtonDefinition, ToggleButtonGroup, ToggleButtonGroupDefinition, Tooltip, TooltipDefinition, TooltipTrigger, VisuallyHidden, VisuallyHiddenDefinition, getNodeText, useAnalytics, useBgConsumer, useBgProvider, useBreakpoint, useTable };
|
|
3007
|
-
export type { AccordionGroupOwnProps, AccordionGroupProps, AccordionOwnProps, AccordionPanelOwnProps, AccordionPanelProps, AccordionProps, AccordionTriggerOwnProps, AccordionTriggerProps, AlertOwnProps, AlertProps, AlignItems, AnalyticsEventAttributes, AnalyticsTracker, AvatarOwnProps, AvatarProps, BUIProviderProps, BgContextValue, BgProviderProps, Border, BorderRadius, BoxOwnProps, BoxProps, BoxUtilityProps, Breakpoint, ButtonIconOwnProps, ButtonIconProps, ButtonLinkOwnProps, ButtonLinkProps, ButtonOwnProps, ButtonProps, CardBaseProps, CardBodyOwnProps, CardBodyProps, CardButtonVariant, CardFooterOwnProps, CardFooterProps, CardHeaderOwnProps, CardHeaderProps, CardLinkVariant, CardOwnProps, CardProps, CardStaticVariant, CellOwnProps, CellProfileOwnProps, CellProfileProps, CellProps, CellTextOwnProps, CellTextProps, CheckboxOwnProps, CheckboxProps, ColumnConfig, ColumnOwnProps, ColumnProps, Columns, ContainerBg, ContainerOwnProps, ContainerProps, CursorParams, CursorResponse, DialogBodyOwnProps, DialogBodyProps, DialogFooterOwnProps, DialogFooterProps, DialogHeaderOwnProps, DialogHeaderProps, DialogOwnProps, DialogProps, DialogTriggerProps, Display, FieldLabelOwnProps, FieldLabelProps, FilterState, FlexDirection, FlexOwnProps, FlexProps, FlexWrap, FullPageOwnProps, FullPageProps, GridItemOwnProps, GridItemProps, GridOwnProps, GridProps, HeaderBreadcrumb, HeaderOwnProps, HeaderPageBreadcrumb, HeaderPageOwnProps, HeaderPageProps, HeaderProps, HeaderTab, JustifyContent, LinkOwnProps, LinkProps, MarginProps, MenuAutocompleteListBoxOwnProps, MenuAutocompleteListBoxProps, MenuAutocompleteOwnProps, MenuAutocompleteProps, MenuItemOwnProps, MenuItemProps, MenuListBoxItemOwnProps, MenuListBoxItemProps, MenuListBoxOwnProps, MenuListBoxProps, MenuOwnProps, MenuPopoverOwnProps, MenuProps, MenuSectionOwnProps, MenuSectionProps, MenuSeparatorOwnProps, MenuSeparatorProps, MenuTriggerProps, NoPagination, OffsetParams, OffsetResponse, Option, PaddingProps, PagePagination, PageSizeOption, PaginationOptions, PasswordFieldOwnProps, PasswordFieldProps, PluginHeaderOwnProps, PluginHeaderProps, PopoverOwnProps, PopoverProps, ProviderBg, QueryOptions, RadioGroupOwnProps, RadioGroupProps, RadioOwnProps, RadioProps, Responsive, RowConfig, RowOwnProps, RowProps, RowRenderFn, SearchFieldOwnProps, SearchFieldProps, SearchState, SelectOwnProps, SelectProps, SkeletonOwnProps, SkeletonProps, SortDescriptor, SortState, Space, SpaceProps, SubmenuTriggerProps, SwitchOwnProps, SwitchProps, TabListOwnProps, TabListProps, TabMatchStrategy, TabOwnProps, TabPanelOwnProps, TabPanelProps, TabProps, TableBodyOwnProps, TableBodyProps, TableHeaderOwnProps, TableHeaderProps, TableItem, TablePaginationOwnProps, TablePaginationProps, TablePaginationType, TableProps, TableRootOwnProps, TableRootProps, TableSelection, TabsOwnProps, TabsProps, TagGroupOwnProps, TagGroupProps, TagOwnProps, TagProps, TextColorStatus, TextColors, TextFieldOwnProps, TextFieldProps, TextOwnProps, TextProps, TextVariants, TextWeights, ToggleButtonGroupOwnProps, ToggleButtonGroupProps, ToggleButtonOwnProps, ToggleButtonProps, TooltipOwnProps, TooltipProps, UseAnalyticsFn, UseTableCompleteOptions, UseTableCursorOptions, UseTableOffsetOptions, UseTableOptions, UseTableResult, UtilityProps, VisuallyHiddenOwnProps, VisuallyHiddenProps };
|
|
3303
|
+
export { Accordion, AccordionDefinition, AccordionGroup, AccordionGroupDefinition, AccordionPanel, AccordionPanelDefinition, AccordionTrigger, AccordionTriggerDefinition, Alert, AlertDefinition, Avatar, AvatarDefinition, BUIProvider, BgProvider, Box, BoxDefinition, Button, ButtonDefinition, ButtonIcon, ButtonIconDefinition, ButtonLink, ButtonLinkDefinition, Card, CardBody, CardBodyDefinition, CardDefinition, CardFooter, CardFooterDefinition, CardHeader, CardHeaderDefinition, Cell, CellProfile, CellText, Checkbox, CheckboxDefinition, Column, Container, ContainerDefinition, Dialog, DialogBody, DialogBodyDefinition, DialogDefinition, DialogFooter, DialogFooterDefinition, DialogHeader, DialogHeaderDefinition, DialogTrigger, FieldLabel, FieldLabelDefinition, Flex, FlexDefinition, FullPage, FullPageDefinition, Grid, GridDefinition, GridItemDefinition, Header, HeaderDefinition, HeaderPage, HeaderPageDefinition, Link, LinkDefinition, List, ListDefinition, ListRow, ListRowDefinition, Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuDefinition, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, PasswordField, PasswordFieldDefinition, PluginHeader, PluginHeaderDefinition, Popover, PopoverDefinition, Radio, RadioDefinition, RadioGroup, RadioGroupDefinition, Row, SearchAutocomplete, SearchAutocompleteDefinition, SearchAutocompleteItem, SearchField, SearchFieldDefinition, Select, SelectDefinition, Skeleton, SkeletonDefinition, SubmenuTrigger, Switch, SwitchDefinition, Tab, TabList, TabPanel, Table, TableBody, TableDefinition, TableHeader, TablePagination, TablePaginationDefinition, TableRoot, Tabs, TabsDefinition, Tag, TagGroup, TagGroupDefinition, Text, TextDefinition, TextField, TextFieldDefinition, ToggleButton, ToggleButtonDefinition, ToggleButtonGroup, ToggleButtonGroupDefinition, Tooltip, TooltipDefinition, TooltipTrigger, VisuallyHidden, VisuallyHiddenDefinition, getNodeText, useAnalytics, useBgConsumer, useBgProvider, useBreakpoint, useTable };
|
|
3304
|
+
export type { AccordionGroupOwnProps, AccordionGroupProps, AccordionOwnProps, AccordionPanelOwnProps, AccordionPanelProps, AccordionProps, AccordionTriggerOwnProps, AccordionTriggerProps, AlertOwnProps, AlertProps, AlignItems, AnalyticsEventAttributes, AnalyticsTracker, AvatarOwnProps, AvatarProps, BUIProviderProps, BgContextValue, BgProviderProps, Border, BorderRadius, BoxOwnProps, BoxProps, BoxUtilityProps, Breakpoint, ButtonIconOwnProps, ButtonIconProps, ButtonLinkOwnProps, ButtonLinkProps, ButtonOwnProps, ButtonProps, CardBaseProps, CardBodyOwnProps, CardBodyProps, CardButtonVariant, CardFooterOwnProps, CardFooterProps, CardHeaderOwnProps, CardHeaderProps, CardLinkVariant, CardOwnProps, CardProps, CardStaticVariant, CellOwnProps, CellProfileOwnProps, CellProfileProps, CellProps, CellTextOwnProps, CellTextProps, CheckboxOwnProps, CheckboxProps, ColumnConfig, ColumnOwnProps, ColumnProps, Columns, ContainerBg, ContainerOwnProps, ContainerProps, CursorParams, CursorResponse, DialogBodyOwnProps, DialogBodyProps, DialogFooterOwnProps, DialogFooterProps, DialogHeaderOwnProps, DialogHeaderProps, DialogOwnProps, DialogProps, DialogTriggerProps, Display, FieldLabelOwnProps, FieldLabelProps, FilterState, FlexDirection, FlexOwnProps, FlexProps, FlexWrap, FullPageOwnProps, FullPageProps, GridItemOwnProps, GridItemProps, GridOwnProps, GridProps, HeaderBreadcrumb, HeaderOwnProps, HeaderPageBreadcrumb, HeaderPageOwnProps, HeaderPageProps, HeaderProps, HeaderTab, JustifyContent, LinkOwnProps, LinkProps, ListOwnProps, ListProps, ListRowOwnProps, ListRowProps, MarginProps, MenuAutocompleteListBoxOwnProps, MenuAutocompleteListBoxProps, MenuAutocompleteOwnProps, MenuAutocompleteProps, MenuItemOwnProps, MenuItemProps, MenuListBoxItemOwnProps, MenuListBoxItemProps, MenuListBoxOwnProps, MenuListBoxProps, MenuOwnProps, MenuPopoverOwnProps, MenuProps, MenuSectionOwnProps, MenuSectionProps, MenuSeparatorOwnProps, MenuSeparatorProps, MenuTriggerProps, NoPagination, OffsetParams, OffsetResponse, Option, PaddingProps, PagePagination, PageSizeOption, PaginationOptions, PasswordFieldOwnProps, PasswordFieldProps, PluginHeaderOwnProps, PluginHeaderProps, PopoverOwnProps, PopoverProps, ProviderBg, QueryOptions, RadioGroupOwnProps, RadioGroupProps, RadioOwnProps, RadioProps, Responsive, RowConfig, RowOwnProps, RowProps, RowRenderFn, SearchAutocompleteItemOwnProps, SearchAutocompleteItemProps, SearchAutocompleteOwnProps, SearchAutocompleteProps, SearchFieldOwnProps, SearchFieldProps, SearchState, SelectOwnProps, SelectProps, SkeletonOwnProps, SkeletonProps, SortDescriptor, SortState, Space, SpaceProps, SubmenuTriggerProps, SwitchOwnProps, SwitchProps, TabListOwnProps, TabListProps, TabMatchStrategy, TabOwnProps, TabPanelOwnProps, TabPanelProps, TabProps, TableBodyOwnProps, TableBodyProps, TableHeaderOwnProps, TableHeaderProps, TableItem, TablePaginationOwnProps, TablePaginationProps, TablePaginationType, TableProps, TableRootOwnProps, TableRootProps, TableSelection, TabsOwnProps, TabsProps, TagGroupOwnProps, TagGroupProps, TagOwnProps, TagProps, TextColorStatus, TextColors, TextFieldOwnProps, TextFieldProps, TextOwnProps, TextProps, TextVariants, TextWeights, ToggleButtonGroupOwnProps, ToggleButtonGroupProps, ToggleButtonOwnProps, ToggleButtonProps, TooltipOwnProps, TooltipProps, UseAnalyticsFn, UseTableCompleteOptions, UseTableCursorOptions, UseTableOffsetOptions, UseTableOptions, UseTableResult, UtilityProps, VirtualizedProp, VisuallyHiddenOwnProps, VisuallyHiddenProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -63,10 +63,14 @@ export { Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuItem, MenuListBox,
|
|
|
63
63
|
export { MenuDefinition } from './components/Menu/definition.esm.js';
|
|
64
64
|
export { Popover } from './components/Popover/Popover.esm.js';
|
|
65
65
|
export { PopoverDefinition } from './components/Popover/definition.esm.js';
|
|
66
|
+
export { SearchAutocomplete, SearchAutocompleteItem } from './components/SearchAutocomplete/SearchAutocomplete.esm.js';
|
|
67
|
+
export { SearchAutocompleteDefinition } from './components/SearchAutocomplete/definition.esm.js';
|
|
66
68
|
export { SearchField } from './components/SearchField/SearchField.esm.js';
|
|
67
69
|
export { SearchFieldDefinition } from './components/SearchField/definition.esm.js';
|
|
68
70
|
export { Link } from './components/Link/Link.esm.js';
|
|
69
71
|
export { LinkDefinition } from './components/Link/definition.esm.js';
|
|
72
|
+
export { List, ListRow } from './components/List/List.esm.js';
|
|
73
|
+
export { ListDefinition, ListRowDefinition } from './components/List/definition.esm.js';
|
|
70
74
|
export { Select } from './components/Select/Select.esm.js';
|
|
71
75
|
export { SelectDefinition } from './components/Select/definition.esm.js';
|
|
72
76
|
export { Skeleton } from './components/Skeleton/Skeleton.esm.js';
|
|
@@ -81,7 +85,7 @@ export { VisuallyHidden } from './components/VisuallyHidden/VisuallyHidden.esm.j
|
|
|
81
85
|
export { VisuallyHiddenDefinition } from './components/VisuallyHidden/definition.esm.js';
|
|
82
86
|
export { useBreakpoint } from './hooks/useBreakpoint.esm.js';
|
|
83
87
|
export { BgProvider, useBgConsumer, useBgProvider } from './hooks/useBg.esm.js';
|
|
88
|
+
export { BUIProvider } from './provider/BUIProvider.esm.js';
|
|
84
89
|
export { useAnalytics } from './analytics/useAnalytics.esm.js';
|
|
85
|
-
export { BUIProvider } from './analytics/BUIProvider.esm.js';
|
|
86
90
|
export { getNodeText } from './analytics/getNodeText.esm.js';
|
|
87
91
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { RouterProvider } from 'react-aria-components';
|
|
4
|
+
import { useInRouterContext, useNavigate, useHref } from 'react-router-dom';
|
|
5
|
+
import { createVersionedValueMap } from '@backstage/version-bridge';
|
|
6
|
+
import { BUIContext } from '../analytics/useAnalytics.esm.js';
|
|
7
|
+
|
|
8
|
+
function BUIProvider(props) {
|
|
9
|
+
const { useAnalytics, children } = props;
|
|
10
|
+
const value = useMemo(
|
|
11
|
+
() => createVersionedValueMap({
|
|
12
|
+
1: { useAnalytics }
|
|
13
|
+
}),
|
|
14
|
+
[useAnalytics]
|
|
15
|
+
);
|
|
16
|
+
const content = /* @__PURE__ */ jsx(BUIContext.Provider, { value, children });
|
|
17
|
+
if (useInRouterContext()) {
|
|
18
|
+
return /* @__PURE__ */ jsx(RoutedContent, { children: content });
|
|
19
|
+
}
|
|
20
|
+
return content;
|
|
21
|
+
}
|
|
22
|
+
function RoutedContent({ children }) {
|
|
23
|
+
const navigate = useNavigate();
|
|
24
|
+
return /* @__PURE__ */ jsx(RouterProvider, { navigate, useHref, children });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { BUIProvider };
|
|
28
|
+
//# sourceMappingURL=BUIProvider.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BUIProvider.esm.js","sources":["../../src/provider/BUIProvider.tsx"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useMemo, type ReactNode } from 'react';\nimport { RouterProvider } from 'react-aria-components';\nimport { useInRouterContext, useNavigate, useHref } from 'react-router-dom';\nimport { createVersionedValueMap } from '@backstage/version-bridge';\nimport { BUIContext } from '../analytics/useAnalytics';\nimport type { UseAnalyticsFn } from '../analytics/types';\n\n/** @public */\nexport type BUIProviderProps = {\n useAnalytics?: UseAnalyticsFn;\n children: ReactNode;\n};\n\n/**\n * Provides integration capabilities to all descendant BUI components.\n *\n * @example\n * ```tsx\n * import { BUIProvider } from '@backstage/ui';\n * import { useAnalytics as useBackstageAnalytics } from '@backstage/core-plugin-api';\n *\n * function App() {\n * return (\n * <BUIProvider useAnalytics={useBackstageAnalytics}>\n * <AppContent />\n * </BUIProvider>\n * );\n * }\n * ```\n *\n * @public\n */\nexport function BUIProvider(props: BUIProviderProps) {\n const { useAnalytics, children } = props;\n const value = useMemo(\n () =>\n createVersionedValueMap({\n 1: { useAnalytics },\n }),\n [useAnalytics],\n );\n\n const content = (\n <BUIContext.Provider value={value}>{children}</BUIContext.Provider>\n );\n\n if (useInRouterContext()) {\n return <RoutedContent>{content}</RoutedContent>;\n }\n\n return content;\n}\n\nfunction RoutedContent({ children }: { children: ReactNode }) {\n const navigate = useNavigate();\n return (\n <RouterProvider navigate={navigate} useHref={useHref}>\n {children}\n </RouterProvider>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAgDO,SAAS,YAAY,KAAA,EAAyB;AACnD,EAAA,MAAM,EAAE,YAAA,EAAc,QAAA,EAAS,GAAI,KAAA;AACnC,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,MACE,uBAAA,CAAwB;AAAA,MACtB,CAAA,EAAG,EAAE,YAAA;AAAa,KACnB,CAAA;AAAA,IACH,CAAC,YAAY;AAAA,GACf;AAEA,EAAA,MAAM,0BACJ,GAAA,CAAC,UAAA,CAAW,QAAA,EAAX,EAAoB,OAAe,QAAA,EAAS,CAAA;AAG/C,EAAA,IAAI,oBAAmB,EAAG;AACxB,IAAA,uBAAO,GAAA,CAAC,iBAAe,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,EACjC;AAEA,EAAA,OAAO,OAAA;AACT;AAEA,SAAS,aAAA,CAAc,EAAE,QAAA,EAAS,EAA4B;AAC5D,EAAA,MAAM,WAAW,WAAA,EAAY;AAC7B,EAAA,uBACE,GAAA,CAAC,cAAA,EAAA,EAAe,QAAA,EAAoB,OAAA,EACjC,QAAA,EACH,CAAA;AAEJ;;;;"}
|
|
@@ -11,6 +11,9 @@ function isExternalLink(href) {
|
|
|
11
11
|
}
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
|
+
function isInternalLink(href) {
|
|
15
|
+
return !!href && !isExternalLink(href);
|
|
16
|
+
}
|
|
14
17
|
|
|
15
|
-
export { isExternalLink };
|
|
16
|
-
//# sourceMappingURL=
|
|
18
|
+
export { isExternalLink, isInternalLink };
|
|
19
|
+
//# sourceMappingURL=linkUtils.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linkUtils.esm.js","sources":["../../src/utils/linkUtils.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Determines if a link is external.\n * @param href - The href of the link.\n * @returns True if the link is external, false otherwise.\n * @internal\n */\nexport function isExternalLink(href?: string): boolean {\n if (!href) return false;\n\n // Check if it's an absolute URL with protocol\n if (href.startsWith('http://') || href.startsWith('https://')) {\n return true;\n }\n\n // Check if it's a protocol-relative URL\n if (href.startsWith('//')) {\n return true;\n }\n\n // Check if it's a mailto: or tel: link\n if (href.startsWith('mailto:') || href.startsWith('tel:')) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if an href is an internal link (not external and not empty).\n *\n * @internal\n */\nexport function isInternalLink(href: string | undefined): href is string {\n return !!href && !isExternalLink(href);\n}\n"],"names":[],"mappings":"AAsBO,SAAS,eAAe,IAAA,EAAwB;AACrD,EAAA,IAAI,CAAC,MAAM,OAAO,KAAA;AAGlB,EAAA,IAAI,KAAK,UAAA,CAAW,SAAS,KAAK,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG;AAC7D,IAAA,OAAO,IAAA;AAAA,EACT;AAGA,EAAA,IAAI,IAAA,CAAK,UAAA,CAAW,IAAI,CAAA,EAAG;AACzB,IAAA,OAAO,IAAA;AAAA,EACT;AAGA,EAAA,IAAI,KAAK,UAAA,CAAW,SAAS,KAAK,IAAA,CAAK,UAAA,CAAW,MAAM,CAAA,EAAG;AACzD,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,OAAO,KAAA;AACT;AAOO,SAAS,eAAe,IAAA,EAA0C;AACvE,EAAA,OAAO,CAAC,CAAC,IAAA,IAAQ,CAAC,eAAe,IAAI,CAAA;AACvC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/ui",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "web-library"
|
|
6
6
|
},
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"test": "backstage-cli package test"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@backstage/version-bridge": "1.0.12",
|
|
53
|
+
"@backstage/version-bridge": "^1.0.12",
|
|
54
54
|
"@remixicon/react": "^4.6.0",
|
|
55
55
|
"@tanstack/react-table": "^8.21.3",
|
|
56
56
|
"clsx": "^2.1.1",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"use-sync-external-store": "^1.4.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@backstage/cli": "0.36.0
|
|
61
|
+
"@backstage/cli": "^0.36.0",
|
|
62
62
|
"@types/react": "^18.0.0",
|
|
63
63
|
"@types/react-dom": "^18.0.0",
|
|
64
64
|
"@types/use-sync-external-store": "^0.0.6",
|
|
65
65
|
"eslint-plugin-storybook": "^10.3.0-alpha.1",
|
|
66
66
|
"glob": "^11.0.1",
|
|
67
|
-
"globals": "^
|
|
67
|
+
"globals": "^17.0.0",
|
|
68
68
|
"react": "^18.0.2",
|
|
69
69
|
"react-dom": "^18.0.2",
|
|
70
70
|
"react-router-dom": "^6.30.2",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { createVersionedValueMap } from '@backstage/version-bridge';
|
|
4
|
-
import { BUIContext } from './useAnalytics.esm.js';
|
|
5
|
-
|
|
6
|
-
function BUIProvider(props) {
|
|
7
|
-
const { useAnalytics, children } = props;
|
|
8
|
-
const value = useMemo(
|
|
9
|
-
() => createVersionedValueMap({
|
|
10
|
-
1: { useAnalytics }
|
|
11
|
-
}),
|
|
12
|
-
[useAnalytics]
|
|
13
|
-
);
|
|
14
|
-
return /* @__PURE__ */ jsx(BUIContext.Provider, { value, children });
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { BUIProvider };
|
|
18
|
-
//# sourceMappingURL=BUIProvider.esm.js.map
|