@backstage/ui 0.13.0-next.2 → 0.13.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +243 -0
  2. package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
  3. package/dist/components/Button/Button.module.css.esm.js +2 -2
  4. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +2 -2
  5. package/dist/components/ButtonLink/ButtonLink.esm.js +2 -3
  6. package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
  7. package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +2 -2
  8. package/dist/components/Card/Card.esm.js +1 -1
  9. package/dist/components/Card/Card.esm.js.map +1 -1
  10. package/dist/components/Card/Card.module.css.esm.js +2 -2
  11. package/dist/components/Checkbox/Checkbox.esm.js +12 -3
  12. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  13. package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
  14. package/dist/components/Checkbox/definition.esm.js +0 -2
  15. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  16. package/dist/components/Container/Container.module.css.esm.js +2 -2
  17. package/dist/components/Dialog/Dialog.esm.js +3 -1
  18. package/dist/components/Dialog/Dialog.esm.js.map +1 -1
  19. package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
  20. package/dist/components/Header/Header.module.css.esm.js +2 -2
  21. package/dist/components/Header/definition.esm.js +5 -5
  22. package/dist/components/Header/definition.esm.js.map +1 -1
  23. package/dist/components/Link/Link.esm.js +1 -2
  24. package/dist/components/Link/Link.esm.js.map +1 -1
  25. package/dist/components/List/List.esm.js +70 -0
  26. package/dist/components/List/List.esm.js.map +1 -0
  27. package/dist/components/List/List.module.css.esm.js +8 -0
  28. package/dist/components/List/List.module.css.esm.js.map +1 -0
  29. package/dist/components/List/definition.esm.js +44 -0
  30. package/dist/components/List/definition.esm.js.map +1 -0
  31. package/dist/components/Menu/Menu.esm.js +5 -7
  32. package/dist/components/Menu/Menu.esm.js.map +1 -1
  33. package/dist/components/Menu/Menu.module.css.esm.js +2 -2
  34. package/dist/components/PluginHeader/PluginHeader.esm.js +37 -7
  35. package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
  36. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js +164 -0
  37. package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -0
  38. package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js +8 -0
  39. package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js.map +1 -0
  40. package/dist/components/SearchAutocomplete/definition.esm.js +52 -0
  41. package/dist/components/SearchAutocomplete/definition.esm.js.map +1 -0
  42. package/dist/components/Select/Select.module.css.esm.js +2 -2
  43. package/dist/components/Table/Table.module.css.esm.js +2 -2
  44. package/dist/components/Table/components/Row.esm.js +21 -9
  45. package/dist/components/Table/components/Row.esm.js.map +1 -1
  46. package/dist/components/Table/components/Table.esm.js +80 -68
  47. package/dist/components/Table/components/Table.esm.js.map +1 -1
  48. package/dist/components/Table/components/TableBodySkeleton.esm.js +33 -0
  49. package/dist/components/Table/components/TableBodySkeleton.esm.js.map +1 -0
  50. package/dist/components/Table/components/TableHeader.esm.js +2 -2
  51. package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
  52. package/dist/components/Table/components/TableRoot.esm.js +1 -1
  53. package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
  54. package/dist/components/Table/definition.esm.js +14 -2
  55. package/dist/components/Table/definition.esm.js.map +1 -1
  56. package/dist/components/Table/hooks/useCompletePagination.esm.js +14 -6
  57. package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -1
  58. package/dist/components/Tabs/Tabs.esm.js +3 -5
  59. package/dist/components/Tabs/Tabs.esm.js.map +1 -1
  60. package/dist/components/TagGroup/TagGroup.esm.js +2 -5
  61. package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
  62. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js +2 -2
  63. package/dist/css/styles.css +4 -3
  64. package/dist/index.d.ts +337 -41
  65. package/dist/index.esm.js +5 -1
  66. package/dist/index.esm.js.map +1 -1
  67. package/dist/provider/BUIProvider.esm.js +28 -0
  68. package/dist/provider/BUIProvider.esm.js.map +1 -0
  69. package/dist/utils/{isExternalLink.esm.js → linkUtils.esm.js} +5 -2
  70. package/dist/utils/linkUtils.esm.js.map +1 -0
  71. package/package.json +4 -4
  72. package/dist/analytics/BUIProvider.esm.js +0 -18
  73. package/dist/analytics/BUIProvider.esm.js.map +0 -1
  74. package/dist/components/InternalLinkProvider/InternalLinkProvider.esm.js +0 -55
  75. package/dist/components/InternalLinkProvider/InternalLinkProvider.esm.js.map +0 -1
  76. 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-HeaderPage";
1393
- readonly content: "bui-HeaderPageContent";
1394
- readonly breadcrumbs: "bui-HeaderPageBreadcrumbs";
1395
- readonly tabsWrapper: "bui-HeaderPageTabsWrapper";
1396
- readonly controls: "bui-HeaderPageControls";
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-HeaderPage";
1416
- readonly content: "bui-HeaderPageContent";
1417
- readonly breadcrumbs: "bui-HeaderPageBreadcrumbs";
1418
- readonly tabsWrapper: "bui-HeaderPageTabsWrapper";
1419
- readonly controls: "bui-HeaderPageControls";
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
- selected?: boolean;
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
- /** @public */
1739
+ /**
1740
+ * Own props for the {@link Cell} component.
1741
+ *
1742
+ * @public
1743
+ */
1747
1744
  type CellOwnProps = {
1748
1745
  className?: string;
1749
1746
  };
1750
- /** @public */
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
- /** @public */
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
- /** @public */
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
- /** @public */
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
- /** @public */
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
- /** @public */
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
- /** @public */
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,117 @@ 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 classNames: {
2631
+ readonly root: "bui-SearchAutocomplete";
2632
+ readonly searchField: "bui-SearchAutocompleteSearchField";
2633
+ readonly searchFieldInput: "bui-SearchAutocompleteInput";
2634
+ readonly searchFieldClear: "bui-SearchAutocompleteClear";
2635
+ readonly popover: "bui-SearchAutocompletePopover";
2636
+ readonly inner: "bui-SearchAutocompleteInner";
2637
+ readonly listBox: "bui-SearchAutocompleteListBox";
2638
+ readonly loadingState: "bui-SearchAutocompleteLoadingState";
2639
+ readonly emptyState: "bui-SearchAutocompleteEmptyState";
2640
+ };
2641
+ readonly propDefs: {
2642
+ readonly 'aria-label': {};
2643
+ readonly 'aria-labelledby': {};
2644
+ readonly size: {
2645
+ readonly dataAttribute: true;
2646
+ readonly default: "small";
2647
+ };
2648
+ readonly placeholder: {
2649
+ readonly default: "Search";
2650
+ };
2651
+ readonly inputValue: {};
2652
+ readonly onInputChange: {};
2653
+ readonly popoverWidth: {};
2654
+ readonly popoverPlacement: {};
2655
+ readonly children: {};
2656
+ readonly isLoading: {};
2657
+ readonly defaultOpen: {};
2658
+ readonly className: {};
2659
+ readonly style: {};
2660
+ };
2661
+ };
2662
+
2483
2663
  /** @public */
2484
2664
  type SearchFieldOwnProps = {
2485
2665
  /**
@@ -2604,6 +2784,122 @@ declare const LinkDefinition: {
2604
2784
  };
2605
2785
  };
2606
2786
 
2787
+ /**
2788
+ * Own props for the List component.
2789
+ *
2790
+ * @public
2791
+ */
2792
+ type ListOwnProps<T = object> = {
2793
+ items?: GridListProps<T>['items'];
2794
+ children?: GridListProps<T>['children'];
2795
+ renderEmptyState?: GridListProps<T>['renderEmptyState'];
2796
+ className?: string;
2797
+ };
2798
+ /**
2799
+ * Props for the List component.
2800
+ *
2801
+ * @public
2802
+ */
2803
+ interface ListProps<T> extends ListOwnProps<T>, Omit<GridListProps<T>, keyof ListOwnProps<T>> {
2804
+ }
2805
+ /**
2806
+ * Own props for the ListRow component.
2807
+ *
2808
+ * @public
2809
+ */
2810
+ type ListRowOwnProps = {
2811
+ /**
2812
+ * The main label content of the row.
2813
+ */
2814
+ children?: React.ReactNode;
2815
+ /**
2816
+ * Optional secondary description text.
2817
+ */
2818
+ description?: string;
2819
+ /**
2820
+ * Optional icon displayed before the label, rendered in a 32×32px box.
2821
+ */
2822
+ icon?: React.ReactElement;
2823
+ /**
2824
+ * Optional menu items rendered inside an automatically managed dropdown menu.
2825
+ * Pass `MenuItem` nodes here and the component will render the trigger button
2826
+ * and menu wrapper for you.
2827
+ */
2828
+ menuItems?: React.ReactNode;
2829
+ /**
2830
+ * Optional actions rendered in a flex row on the right side of the row,
2831
+ * e.g. a set of tags. For a dropdown menu, prefer `menuItems`.
2832
+ */
2833
+ customActions?: React.ReactNode;
2834
+ className?: string;
2835
+ };
2836
+ /**
2837
+ * Props for the ListRow component.
2838
+ *
2839
+ * @public
2840
+ */
2841
+ interface ListRowProps extends ListRowOwnProps, Omit<GridListItemProps, keyof ListRowOwnProps> {
2842
+ }
2843
+
2844
+ /**
2845
+ * A list displays a list of interactive rows with support for keyboard
2846
+ * navigation, single or multiple selection, and row actions.
2847
+ *
2848
+ * @public
2849
+ */
2850
+ declare const List: <T extends object>(props: ListProps<T>) => react_jsx_runtime.JSX.Element;
2851
+ /**
2852
+ * A row within a List.
2853
+ *
2854
+ * @public
2855
+ */
2856
+ declare const ListRow: (props: ListRowProps) => react_jsx_runtime.JSX.Element;
2857
+
2858
+ /**
2859
+ * Component definition for List
2860
+ * @public
2861
+ */
2862
+ declare const ListDefinition: {
2863
+ readonly styles: {
2864
+ readonly [key: string]: string;
2865
+ };
2866
+ readonly classNames: {
2867
+ readonly root: "bui-List";
2868
+ };
2869
+ readonly propDefs: {
2870
+ readonly items: {};
2871
+ readonly children: {};
2872
+ readonly renderEmptyState: {};
2873
+ readonly className: {};
2874
+ };
2875
+ };
2876
+ /**
2877
+ * Component definition for ListRow
2878
+ * @public
2879
+ */
2880
+ declare const ListRowDefinition: {
2881
+ readonly styles: {
2882
+ readonly [key: string]: string;
2883
+ };
2884
+ readonly bg: "consumer";
2885
+ readonly classNames: {
2886
+ readonly root: "bui-ListRow";
2887
+ readonly check: "bui-ListRowCheck";
2888
+ readonly icon: "bui-ListRowIcon";
2889
+ readonly label: "bui-ListRowLabel";
2890
+ readonly description: "bui-ListRowDescription";
2891
+ readonly actions: "bui-ListRowActions";
2892
+ };
2893
+ readonly propDefs: {
2894
+ readonly children: {};
2895
+ readonly description: {};
2896
+ readonly icon: {};
2897
+ readonly menuItems: {};
2898
+ readonly customActions: {};
2899
+ readonly className: {};
2900
+ };
2901
+ };
2902
+
2607
2903
  /** @public */
2608
2904
  type Option = {
2609
2905
  value: string;
@@ -2958,16 +3254,6 @@ type AnalyticsTracker = {
2958
3254
  */
2959
3255
  type UseAnalyticsFn = () => AnalyticsTracker;
2960
3256
 
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
3257
  /** @public */
2972
3258
  type BUIProviderProps = {
2973
3259
  useAnalytics?: UseAnalyticsFn;
@@ -2994,6 +3280,16 @@ type BUIProviderProps = {
2994
3280
  */
2995
3281
  declare function BUIProvider(props: BUIProviderProps): react_jsx_runtime.JSX.Element;
2996
3282
 
3283
+ /**
3284
+ * Returns an AnalyticsTracker for capturing analytics events.
3285
+ *
3286
+ * By default returns a noop tracker. When a `BUIProvider` is present
3287
+ * in the tree, returns the tracker provided by the consumer's hook.
3288
+ *
3289
+ * @public
3290
+ */
3291
+ declare function useAnalytics(): AnalyticsTracker;
3292
+
2997
3293
  /**
2998
3294
  * Recursively extracts text content from a React node tree.
2999
3295
  * Returns undefined if no text content is found (e.g. icon-only children
@@ -3003,5 +3299,5 @@ declare function BUIProvider(props: BUIProviderProps): react_jsx_runtime.JSX.Ele
3003
3299
  */
3004
3300
  declare function getNodeText(node: ReactNode | ((...args: any[]) => ReactNode)): string | undefined;
3005
3301
 
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 };
3302
+ 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 };
3303
+ 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
@@ -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=isExternalLink.esm.js.map
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.0-next.2",
3
+ "version": "0.13.0",
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-next.2",
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": "^15.11.0",
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