@backstage/ui 0.0.0-nightly-20260108025012 → 0.0.0-nightly-20260109025055

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 (32) hide show
  1. package/CHANGELOG.md +43 -1
  2. package/dist/components/Link/Link.esm.js +9 -6
  3. package/dist/components/Link/Link.esm.js.map +1 -1
  4. package/dist/components/Table/Table.module.css.esm.js +1 -1
  5. package/dist/components/Table/components/Table.esm.js +154 -15
  6. package/dist/components/Table/components/Table.esm.js.map +1 -1
  7. package/dist/components/Table/components/TableRoot.esm.js +26 -0
  8. package/dist/components/Table/components/TableRoot.esm.js.map +1 -0
  9. package/dist/components/Table/definition.esm.js +3 -0
  10. package/dist/components/Table/definition.esm.js.map +1 -1
  11. package/dist/components/Table/hooks/useCompletePagination.esm.js +106 -0
  12. package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -0
  13. package/dist/components/Table/hooks/useCursorPagination.esm.js +58 -0
  14. package/dist/components/Table/hooks/useCursorPagination.esm.js.map +1 -0
  15. package/dist/components/Table/hooks/useDebouncedReload.esm.js +17 -0
  16. package/dist/components/Table/hooks/useDebouncedReload.esm.js.map +1 -0
  17. package/dist/components/Table/hooks/useOffsetPagination.esm.js +64 -0
  18. package/dist/components/Table/hooks/useOffsetPagination.esm.js.map +1 -0
  19. package/dist/components/Table/hooks/usePageCache.esm.js +168 -0
  20. package/dist/components/Table/hooks/usePageCache.esm.js.map +1 -0
  21. package/dist/components/Table/hooks/useQueryState.esm.js +42 -0
  22. package/dist/components/Table/hooks/useQueryState.esm.js.map +1 -0
  23. package/dist/components/Table/hooks/useStableCallback.esm.js +10 -0
  24. package/dist/components/Table/hooks/useStableCallback.esm.js.map +1 -0
  25. package/dist/components/Table/hooks/useTable.esm.js +80 -99
  26. package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
  27. package/dist/components/TablePagination/TablePagination.esm.js +76 -101
  28. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  29. package/dist/index.d.ts +198 -91
  30. package/dist/index.esm.js +1 -0
  31. package/dist/index.esm.js.map +1 -1
  32. package/package.json +2 -2
@@ -4,111 +4,86 @@ import { useStyles } from '../../hooks/useStyles.esm.js';
4
4
  import { TablePaginationDefinition } from './definition.esm.js';
5
5
  import styles from './TablePagination.module.css.esm.js';
6
6
  import { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react';
7
+ import { useId } from 'react';
7
8
  import { Select } from '../Select/Select.esm.js';
8
9
  import { ButtonIcon } from '../ButtonIcon/ButtonIcon.esm.js';
9
10
  import { Text } from '../Text/Text.esm.js';
10
11
 
11
- function TablePagination(props) {
12
- const { classNames, cleanedProps } = useStyles(TablePaginationDefinition, {
13
- showPageSizeOptions: true,
14
- ...props
15
- });
16
- const {
17
- className,
18
- offset,
19
- pageSize,
20
- rowCount,
21
- onNextPage,
22
- onPreviousPage,
23
- onPageSizeChange,
24
- setOffset,
25
- setPageSize,
26
- showPageSizeOptions,
27
- ...rest
28
- } = cleanedProps;
29
- const currentOffset = offset ?? 0;
30
- const currentPageSize = pageSize ?? 10;
31
- const fromCount = currentOffset + 1;
32
- const toCount = Math.min(currentOffset + currentPageSize, rowCount ?? 0);
33
- const nextPage = () => {
34
- const totalRows = rowCount ?? 0;
35
- const nextOffset = currentOffset + currentPageSize;
36
- if (nextOffset < totalRows) {
37
- onNextPage?.();
38
- setOffset?.(nextOffset);
39
- }
40
- };
41
- const previousPage = () => {
42
- if (currentOffset > 0) {
43
- onPreviousPage?.();
44
- const prevOffset = Math.max(0, currentOffset - currentPageSize);
45
- setOffset?.(prevOffset);
46
- }
47
- };
48
- return /* @__PURE__ */ jsxs(
49
- "div",
50
- {
51
- className: clsx(classNames.root, styles[classNames.root], className),
52
- ...rest,
53
- children: [
54
- /* @__PURE__ */ jsx("div", { className: clsx(classNames.left, styles[classNames.left]), children: showPageSizeOptions && /* @__PURE__ */ jsx(
55
- Select,
56
- {
57
- name: "pageSize",
58
- size: "small",
59
- placeholder: "Show 10 results",
60
- options: [
61
- { label: "Show 5 results", value: "5" },
62
- { label: "Show 10 results", value: "10" },
63
- { label: "Show 20 results", value: "20" },
64
- { label: "Show 30 results", value: "30" },
65
- { label: "Show 40 results", value: "40" },
66
- { label: "Show 50 results", value: "50" }
67
- ],
68
- selectedKey: pageSize?.toString(),
69
- onSelectionChange: (value) => {
70
- const newPageSize = Number(value);
71
- setPageSize?.(newPageSize);
72
- onPageSizeChange?.(newPageSize);
73
- },
74
- className: clsx(classNames.select, styles[classNames.select])
75
- }
76
- ) }),
77
- /* @__PURE__ */ jsxs("div", { className: clsx(classNames.right, styles[classNames.right]), children: [
78
- /* @__PURE__ */ jsx(
79
- Text,
80
- {
81
- as: "p",
82
- variant: "body-medium",
83
- children: `${fromCount} - ${toCount} of ${rowCount}`
84
- }
85
- ),
86
- /* @__PURE__ */ jsx(
87
- ButtonIcon,
88
- {
89
- variant: "secondary",
90
- size: "small",
91
- onClick: previousPage,
92
- isDisabled: currentOffset === 0,
93
- icon: /* @__PURE__ */ jsx(RiArrowLeftSLine, {}),
94
- "aria-label": "Previous"
95
- }
96
- ),
97
- /* @__PURE__ */ jsx(
98
- ButtonIcon,
99
- {
100
- variant: "secondary",
101
- size: "small",
102
- onClick: nextPage,
103
- isDisabled: rowCount !== void 0 && currentOffset + currentPageSize >= rowCount,
104
- icon: /* @__PURE__ */ jsx(RiArrowRightSLine, {}),
105
- "aria-label": "Next"
106
- }
107
- )
108
- ] })
109
- ]
110
- }
111
- );
12
+ function TablePagination({
13
+ pageSize,
14
+ offset,
15
+ totalCount,
16
+ hasNextPage,
17
+ hasPreviousPage,
18
+ onNextPage,
19
+ onPreviousPage,
20
+ onPageSizeChange,
21
+ showPageSizeOptions = true,
22
+ getLabel
23
+ }) {
24
+ const { classNames } = useStyles(TablePaginationDefinition, {});
25
+ const labelId = useId();
26
+ const hasItems = totalCount !== void 0 && totalCount !== 0;
27
+ let label = `${totalCount} items`;
28
+ if (getLabel) {
29
+ label = getLabel({ pageSize, offset, totalCount });
30
+ } else if (offset !== void 0) {
31
+ const fromCount = offset + 1;
32
+ const toCount = Math.min(offset + pageSize, totalCount ?? 0);
33
+ label = `${fromCount} - ${toCount} of ${totalCount}`;
34
+ }
35
+ return /* @__PURE__ */ jsxs("div", { className: clsx(classNames.root, styles[classNames.root]), children: [
36
+ /* @__PURE__ */ jsx("div", { className: clsx(classNames.left, styles[classNames.left]), children: showPageSizeOptions && /* @__PURE__ */ jsx(
37
+ Select,
38
+ {
39
+ name: "pageSize",
40
+ size: "small",
41
+ "aria-label": "Select table page size",
42
+ placeholder: "Show 10 results",
43
+ options: [
44
+ { label: "Show 5 results", value: "5" },
45
+ { label: "Show 10 results", value: "10" },
46
+ { label: "Show 20 results", value: "20" },
47
+ { label: "Show 30 results", value: "30" },
48
+ { label: "Show 40 results", value: "40" },
49
+ { label: "Show 50 results", value: "50" }
50
+ ],
51
+ defaultValue: pageSize.toString(),
52
+ onChange: (value) => {
53
+ const newPageSize = Number(value);
54
+ onPageSizeChange?.(newPageSize);
55
+ },
56
+ className: clsx(classNames.select, styles[classNames.select])
57
+ }
58
+ ) }),
59
+ /* @__PURE__ */ jsxs("div", { className: clsx(classNames.right, styles[classNames.right]), children: [
60
+ hasItems && /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-medium", id: labelId, children: label }),
61
+ /* @__PURE__ */ jsx(
62
+ ButtonIcon,
63
+ {
64
+ variant: "secondary",
65
+ size: "small",
66
+ onClick: onPreviousPage,
67
+ isDisabled: !hasPreviousPage,
68
+ icon: /* @__PURE__ */ jsx(RiArrowLeftSLine, {}),
69
+ "aria-label": "Previous table page",
70
+ "aria-describedby": hasItems ? labelId : void 0
71
+ }
72
+ ),
73
+ /* @__PURE__ */ jsx(
74
+ ButtonIcon,
75
+ {
76
+ variant: "secondary",
77
+ size: "small",
78
+ onClick: onNextPage,
79
+ isDisabled: !hasNextPage,
80
+ icon: /* @__PURE__ */ jsx(RiArrowRightSLine, {}),
81
+ "aria-label": "Next table page",
82
+ "aria-describedby": hasItems ? labelId : void 0
83
+ }
84
+ )
85
+ ] })
86
+ ] });
112
87
  }
113
88
 
114
89
  export { TablePagination };
@@ -1 +1 @@
1
- {"version":3,"file":"TablePagination.esm.js","sources":["../../../src/components/TablePagination/TablePagination.tsx"],"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\nimport clsx from 'clsx';\nimport { Text, ButtonIcon, Select } from '../..';\nimport type { TablePaginationProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { TablePaginationDefinition } from './definition';\nimport styles from './TablePagination.module.css';\nimport { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react';\n\n/**\n * Pagination controls for Table components with page navigation and size selection.\n *\n * @public\n */\nexport function TablePagination(props: TablePaginationProps) {\n const { classNames, cleanedProps } = useStyles(TablePaginationDefinition, {\n showPageSizeOptions: true,\n ...props,\n });\n const {\n className,\n offset,\n pageSize,\n rowCount,\n onNextPage,\n onPreviousPage,\n onPageSizeChange,\n setOffset,\n setPageSize,\n showPageSizeOptions,\n ...rest\n } = cleanedProps;\n\n const currentOffset = offset ?? 0;\n const currentPageSize = pageSize ?? 10;\n\n const fromCount = currentOffset + 1;\n const toCount = Math.min(currentOffset + currentPageSize, rowCount ?? 0);\n\n const nextPage = () => {\n const totalRows = rowCount ?? 0;\n const nextOffset = currentOffset + currentPageSize;\n\n // Check if there are more items to navigate to\n if (nextOffset < totalRows) {\n onNextPage?.(); // Analytics tracking\n setOffset?.(nextOffset); // Navigate to next page\n }\n };\n\n const previousPage = () => {\n // Check if we can go to previous page\n if (currentOffset > 0) {\n onPreviousPage?.(); // Analytics tracking\n const prevOffset = Math.max(0, currentOffset - currentPageSize);\n setOffset?.(prevOffset); // Navigate to previous page\n }\n };\n\n return (\n <div\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...rest}\n >\n <div className={clsx(classNames.left, styles[classNames.left])}>\n {showPageSizeOptions && (\n <Select\n name=\"pageSize\"\n size=\"small\"\n placeholder=\"Show 10 results\"\n options={[\n { label: 'Show 5 results', value: '5' },\n { label: 'Show 10 results', value: '10' },\n { label: 'Show 20 results', value: '20' },\n { label: 'Show 30 results', value: '30' },\n { label: 'Show 40 results', value: '40' },\n { label: 'Show 50 results', value: '50' },\n ]}\n selectedKey={pageSize?.toString()}\n onSelectionChange={value => {\n const newPageSize = Number(value);\n setPageSize?.(newPageSize);\n onPageSizeChange?.(newPageSize);\n }}\n className={clsx(classNames.select, styles[classNames.select])}\n />\n )}\n </div>\n <div className={clsx(classNames.right, styles[classNames.right])}>\n <Text\n as=\"p\"\n variant=\"body-medium\"\n >{`${fromCount} - ${toCount} of ${rowCount}`}</Text>\n <ButtonIcon\n variant=\"secondary\"\n size=\"small\"\n onClick={previousPage}\n isDisabled={currentOffset === 0}\n icon={<RiArrowLeftSLine />}\n aria-label=\"Previous\"\n />\n <ButtonIcon\n variant=\"secondary\"\n size=\"small\"\n onClick={nextPage}\n isDisabled={\n rowCount !== undefined &&\n currentOffset + currentPageSize >= rowCount\n }\n icon={<RiArrowRightSLine />}\n aria-label=\"Next\"\n />\n </div>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;AA6BO,SAAS,gBAAgB,KAAA,EAA6B;AAC3D,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,UAAU,yBAAA,EAA2B;AAAA,IACxE,mBAAA,EAAqB,IAAA;AAAA,IACrB,GAAG;AAAA,GACJ,CAAA;AACD,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,MAAA;AAAA,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,OAAO,OAAO,QAAQ,CAAA;AAAA;AAAA,WAAG;AAAA,0BAC7C,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAQ,WAAA;AAAA,cACR,IAAA,EAAK,OAAA;AAAA,cACL,OAAA,EAAS,YAAA;AAAA,cACT,YAAY,aAAA,KAAkB,CAAA;AAAA,cAC9B,IAAA,sBAAO,gBAAA,EAAA,EAAiB,CAAA;AAAA,cACxB,YAAA,EAAW;AAAA;AAAA,WACb;AAAA,0BACA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAQ,WAAA;AAAA,cACR,IAAA,EAAK,OAAA;AAAA,cACL,OAAA,EAAS,QAAA;AAAA,cACT,UAAA,EACE,QAAA,KAAa,MAAA,IACb,aAAA,GAAgB,eAAA,IAAmB,QAAA;AAAA,cAErC,IAAA,sBAAO,iBAAA,EAAA,EAAkB,CAAA;AAAA,cACzB,YAAA,EAAW;AAAA;AAAA;AACb,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"TablePagination.esm.js","sources":["../../../src/components/TablePagination/TablePagination.tsx"],"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\nimport clsx from 'clsx';\nimport { Text, ButtonIcon, Select } from '../..';\nimport type { TablePaginationProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { TablePaginationDefinition } from './definition';\nimport styles from './TablePagination.module.css';\nimport { RiArrowLeftSLine, RiArrowRightSLine } from '@remixicon/react';\nimport { useId } from 'react';\n\n/**\n * Pagination controls for Table components with page navigation and size selection.\n *\n * @public\n */\nexport function TablePagination({\n pageSize,\n offset,\n totalCount,\n hasNextPage,\n hasPreviousPage,\n onNextPage,\n onPreviousPage,\n onPageSizeChange,\n showPageSizeOptions = true,\n getLabel,\n}: TablePaginationProps) {\n const { classNames } = useStyles(TablePaginationDefinition, {});\n const labelId = useId();\n\n const hasItems = totalCount !== undefined && totalCount !== 0;\n\n let label = `${totalCount} items`;\n if (getLabel) {\n label = getLabel({ pageSize, offset, totalCount });\n } else if (offset !== undefined) {\n const fromCount = offset + 1;\n const toCount = Math.min(offset + pageSize, totalCount ?? 0);\n label = `${fromCount} - ${toCount} of ${totalCount}`;\n }\n\n return (\n <div className={clsx(classNames.root, styles[classNames.root])}>\n <div className={clsx(classNames.left, styles[classNames.left])}>\n {showPageSizeOptions && (\n <Select\n name=\"pageSize\"\n size=\"small\"\n aria-label=\"Select table page size\"\n placeholder=\"Show 10 results\"\n options={[\n { label: 'Show 5 results', value: '5' },\n { label: 'Show 10 results', value: '10' },\n { label: 'Show 20 results', value: '20' },\n { label: 'Show 30 results', value: '30' },\n { label: 'Show 40 results', value: '40' },\n { label: 'Show 50 results', value: '50' },\n ]}\n defaultValue={pageSize.toString()}\n onChange={value => {\n const newPageSize = Number(value);\n onPageSizeChange?.(newPageSize);\n }}\n className={clsx(classNames.select, styles[classNames.select])}\n />\n )}\n </div>\n <div className={clsx(classNames.right, styles[classNames.right])}>\n {hasItems && (\n <Text as=\"p\" variant=\"body-medium\" id={labelId}>\n {label}\n </Text>\n )}\n <ButtonIcon\n variant=\"secondary\"\n size=\"small\"\n onClick={onPreviousPage}\n isDisabled={!hasPreviousPage}\n icon={<RiArrowLeftSLine />}\n aria-label=\"Previous table page\"\n aria-describedby={hasItems ? labelId : undefined}\n />\n <ButtonIcon\n variant=\"secondary\"\n size=\"small\"\n onClick={onNextPage}\n isDisabled={!hasNextPage}\n icon={<RiArrowRightSLine />}\n aria-label=\"Next table page\"\n aria-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AC,UAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,WAAA;AAAA,UACR,IAAA,EAAK,OAAA;AAAA,UACL,OAAA,EAAS,cAAA;AAAA,UACT,YAAY,CAAC,eAAA;AAAA,UACb,IAAA,sBAAO,gBAAA,EAAA,EAAiB,CAAA;AAAA,UACxB,YAAA,EAAW,qBAAA;AAAA,UACX,kBAAA,EAAkB,WAAW,OAAA,GAAU;AAAA;AAAA,OACzC;AAAA,sBACA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,WAAA;AAAA,UACR,IAAA,EAAK,OAAA;AAAA,UACL,OAAA,EAAS,UAAA;AAAA,UACT,YAAY,CAAC,WAAA;AAAA,UACb,IAAA,sBAAO,iBAAA,EAAA,EAAkB,CAAA;AAAA,UACzB,YAAA,EAAW,iBAAA;AAAA,UACX,kBAAA,EAAkB,WAAW,OAAA,GAAU;AAAA;AAAA;AACzC,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ComponentProps } from 'react';
3
- import { ButtonProps as ButtonProps$1, DisclosureProps, HeadingProps, DisclosurePanelProps, DisclosureGroupProps, 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, TableHeaderProps, TableBodyProps, ColumnProps as ColumnProps$1, CellProps as CellProps$1, RowProps, TagGroupProps as TagGroupProps$1, TagListProps, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, MenuTriggerProps as MenuTriggerProps$1, SubmenuTriggerProps as SubmenuTriggerProps$1, MenuProps as MenuProps$1, PopoverProps, ListBoxProps, MenuItemProps as MenuItemProps$1, ListBoxItemProps, MenuSectionProps as MenuSectionProps$1, SeparatorProps, SearchFieldProps as SearchFieldProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$1 } from 'react-aria-components';
3
+ import { ButtonProps as ButtonProps$1, DisclosureProps, HeadingProps, DisclosurePanelProps, DisclosureGroupProps, 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, ColumnProps as ColumnProps$1, CellProps as CellProps$1, TableHeaderProps, TableBodyProps, RowProps, TagGroupProps as TagGroupProps$1, TagListProps, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$1, TooltipTriggerComponentProps, MenuTriggerProps as MenuTriggerProps$1, SubmenuTriggerProps as SubmenuTriggerProps$1, MenuProps as MenuProps$1, PopoverProps, ListBoxProps, MenuItemProps as MenuItemProps$1, ListBoxItemProps, MenuSectionProps as MenuSectionProps$1, SeparatorProps, SearchFieldProps as SearchFieldProps$1, SelectProps as SelectProps$1, SwitchProps as SwitchProps$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
+ import { SortDescriptor as SortDescriptor$1 } from 'react-stately';
6
7
 
7
8
  /** @public */
8
9
  type Breakpoint = 'initial' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -870,14 +871,52 @@ declare const RadioGroupDefinition: {
870
871
  };
871
872
 
872
873
  /** @public */
873
- declare const Table: (props: TableProps) => react_jsx_runtime.JSX.Element;
874
+ interface TablePaginationProps {
875
+ pageSize: number;
876
+ offset?: number;
877
+ totalCount?: number;
878
+ hasNextPage: boolean;
879
+ hasPreviousPage: boolean;
880
+ onNextPage: () => void;
881
+ onPreviousPage: () => void;
882
+ onPageSizeChange?: (size: number) => void;
883
+ showPageSizeOptions?: boolean;
884
+ getLabel?: (params: {
885
+ pageSize: number;
886
+ offset?: number;
887
+ totalCount?: number;
888
+ }) => string;
889
+ }
874
890
 
875
- /** @public */
876
- declare const TableHeader: <T extends object>(props: TableHeaderProps<T>) => react_jsx_runtime.JSX.Element;
891
+ /**
892
+ * Pagination controls for Table components with page navigation and size selection.
893
+ *
894
+ * @public
895
+ */
896
+ declare function TablePagination({ pageSize, offset, totalCount, hasNextPage, hasPreviousPage, onNextPage, onPreviousPage, onPageSizeChange, showPageSizeOptions, getLabel, }: TablePaginationProps): react_jsx_runtime.JSX.Element;
877
897
 
878
- /** @public */
879
- declare const TableBody: <T extends object>(props: TableBodyProps<T>) => react_jsx_runtime.JSX.Element;
898
+ /**
899
+ * Component definition for TablePagination
900
+ * @public
901
+ */
902
+ declare const TablePaginationDefinition: {
903
+ readonly classNames: {
904
+ readonly root: "bui-TablePagination";
905
+ readonly left: "bui-TablePaginationLeft";
906
+ readonly right: "bui-TablePaginationRight";
907
+ readonly select: "bui-TablePaginationSelect";
908
+ };
909
+ };
880
910
 
911
+ /**
912
+ * @public
913
+ */
914
+ type SortDescriptor = SortDescriptor$1;
915
+ /** @public */
916
+ interface SortState {
917
+ descriptor: SortDescriptor | null;
918
+ onSortChange: (descriptor: SortDescriptor) => void;
919
+ }
881
920
  /** @public */
882
921
  interface CellProps extends CellProps$1 {
883
922
  }
@@ -901,6 +940,78 @@ interface CellProfileProps extends CellProps$1 {
901
940
  interface ColumnProps extends Omit<ColumnProps$1, 'children'> {
902
941
  children?: React.ReactNode;
903
942
  }
943
+ /** @public */
944
+ interface TableRootProps extends TableProps$1 {
945
+ stale?: boolean;
946
+ }
947
+ /** @public */
948
+ interface TableItem {
949
+ id: string | number;
950
+ }
951
+ /** @public */
952
+ interface NoPagination {
953
+ type: 'none';
954
+ }
955
+ /** @public */
956
+ interface PagePagination extends TablePaginationProps {
957
+ type: 'page';
958
+ }
959
+ /** @public */
960
+ type TablePaginationType = NoPagination | PagePagination;
961
+ /** @public */
962
+ interface ColumnConfig<T extends TableItem> {
963
+ id: string;
964
+ label: string;
965
+ cell: (item: T) => ReactNode;
966
+ header?: () => ReactNode;
967
+ isSortable?: boolean;
968
+ isHidden?: boolean;
969
+ width?: number | string;
970
+ isRowHeader?: boolean;
971
+ }
972
+ /** @public */
973
+ interface RowConfig<T extends TableItem> {
974
+ getHref?: (item: T) => string | undefined;
975
+ onClick?: (item: T) => void;
976
+ getIsDisabled?: (item: T) => boolean;
977
+ }
978
+ /** @public */
979
+ type RowRenderFn<T extends TableItem> = (params: {
980
+ item: T;
981
+ index: number;
982
+ }) => ReactNode;
983
+ /** @public */
984
+ interface TableSelection {
985
+ mode?: TableProps$1['selectionMode'];
986
+ behavior?: TableProps$1['selectionBehavior'];
987
+ selected?: TableProps$1['selectedKeys'];
988
+ onSelectionChange?: TableProps$1['onSelectionChange'];
989
+ }
990
+ /** @public */
991
+ interface TableProps<T extends TableItem> {
992
+ columnConfig: readonly ColumnConfig<T>[];
993
+ data: T[] | undefined;
994
+ loading?: boolean;
995
+ isStale?: boolean;
996
+ error?: Error;
997
+ pagination: TablePaginationType;
998
+ sort?: SortState;
999
+ rowConfig?: RowConfig<T> | RowRenderFn<T>;
1000
+ selection?: TableSelection;
1001
+ emptyState?: ReactNode;
1002
+ }
1003
+
1004
+ /** @public */
1005
+ declare function Table<T extends TableItem>({ columnConfig, data, loading, isStale, error, pagination, sort, rowConfig, selection, emptyState, }: TableProps<T>): react_jsx_runtime.JSX.Element;
1006
+
1007
+ /** @public */
1008
+ declare const TableRoot: (props: TableRootProps) => react_jsx_runtime.JSX.Element;
1009
+
1010
+ /** @public */
1011
+ declare const TableHeader: <T extends object>(props: TableHeaderProps<T>) => react_jsx_runtime.JSX.Element;
1012
+
1013
+ /** @public */
1014
+ declare const TableBody: <T extends object>(props: TableBodyProps<T>) => react_jsx_runtime.JSX.Element;
904
1015
 
905
1016
  /** @public */
906
1017
  declare const Column: (props: ColumnProps) => react_jsx_runtime.JSX.Element;
@@ -924,84 +1035,97 @@ declare const CellText: {
924
1035
  declare const CellProfile: (props: CellProfileProps) => react_jsx_runtime.JSX.Element;
925
1036
 
926
1037
  /** @public */
927
- interface TablePaginationProps extends React.HTMLAttributes<HTMLDivElement> {
928
- offset?: number;
929
- pageSize?: number;
930
- setPageSize?: (pageSize: number) => void;
931
- setOffset?: (offset: number) => void;
932
- rowCount?: number;
933
- onNextPage?: () => void;
934
- onPreviousPage?: () => void;
935
- onPageSizeChange?: (pageSize: number) => void;
936
- showPageSizeOptions?: boolean;
1038
+ interface FilterState<TFilter> {
1039
+ value: TFilter | undefined;
1040
+ onChange: (value: TFilter) => void;
937
1041
  }
938
-
939
1042
  /** @public */
940
- interface UseTablePaginationConfig {
941
- /** Total number of rows in the dataset - only needed when data is not provided at the top level */
942
- rowCount?: number;
943
- /** Current offset. When provided, pagination is controlled */
944
- offset?: number;
945
- /** Current page size. When provided, pagination is controlled */
1043
+ interface SearchState {
1044
+ value: string;
1045
+ onChange: (value: string) => void;
1046
+ }
1047
+ /** @public */
1048
+ interface QueryOptions<TFilter> {
1049
+ initialSort?: SortDescriptor;
1050
+ sort?: SortDescriptor | null;
1051
+ onSortChange?: (sort: SortDescriptor) => void;
1052
+ initialFilter?: TFilter;
1053
+ filter?: TFilter;
1054
+ onFilterChange?: (filter: TFilter) => void;
1055
+ initialSearch?: string;
1056
+ search?: string;
1057
+ onSearchChange?: (search: string) => void;
1058
+ }
1059
+ /** @public */
1060
+ interface PaginationOptions {
946
1061
  pageSize?: number;
947
- /** Callback when offset changes */
948
- onOffsetChange?: (offset: number) => void;
949
- /** Callback when page size changes */
950
- onPageSizeChange?: (pageSize: number) => void;
951
- /** Default page size for uncontrolled mode */
952
- defaultPageSize?: number;
953
- /** Default offset for uncontrolled mode */
954
- defaultOffset?: number;
955
- /** Callback when next page is clicked */
956
- onNextPage?: () => void;
957
- /** Callback when previous page is clicked */
958
- onPreviousPage?: () => void;
959
- /** Whether to show page size options */
1062
+ initialOffset?: number;
960
1063
  showPageSizeOptions?: boolean;
1064
+ getLabel?: TablePaginationProps['getLabel'];
961
1065
  }
962
1066
  /** @public */
963
- interface UseTablePagination<T = any> {
964
- /** Props to pass to TablePagination component */
965
- paginationProps: TablePaginationProps;
966
- /** Current offset */
1067
+ interface OffsetParams<TFilter> {
967
1068
  offset: number;
968
- /** Current page size */
969
1069
  pageSize: number;
970
- /** Sliced data for current page - only available when data is provided to useTable */
971
- data?: T[];
972
- /** Go to next page */
973
- nextPage: () => void;
974
- /** Go to previous page */
975
- previousPage: () => void;
976
- /** Set specific offset */
977
- setOffset: (offset: number) => void;
978
- /** Set page size */
979
- setPageSize: (pageSize: number) => void;
1070
+ sort: SortDescriptor | null;
1071
+ filter: TFilter | undefined;
1072
+ search: string;
1073
+ signal: AbortSignal;
1074
+ }
1075
+ /** @public */
1076
+ interface CursorParams<TFilter> {
1077
+ cursor: string | undefined;
1078
+ pageSize: number;
1079
+ sort: SortDescriptor | null;
1080
+ filter: TFilter | undefined;
1081
+ search: string;
1082
+ signal: AbortSignal;
1083
+ }
1084
+ /** @public */
1085
+ interface OffsetResponse<T> {
1086
+ data: T[];
1087
+ totalCount: number;
1088
+ }
1089
+ /** @public */
1090
+ interface CursorResponse<T> {
1091
+ data: T[];
1092
+ nextCursor?: string;
1093
+ prevCursor?: string;
1094
+ totalCount?: number;
1095
+ }
1096
+ /** @public */
1097
+ interface UseTableCompleteOptions<T extends TableItem, TFilter = unknown> extends QueryOptions<TFilter> {
1098
+ mode: 'complete';
1099
+ getData: () => T[] | Promise<T[]>;
1100
+ paginationOptions?: PaginationOptions;
1101
+ sortFn?: (data: T[], sort: SortDescriptor) => T[];
1102
+ filterFn?: (data: T[], filter: TFilter) => T[];
1103
+ searchFn?: (data: T[], search: string) => T[];
980
1104
  }
981
1105
  /** @public */
982
- interface UseTableConfig<T = any> {
983
- /** Full dataset - when provided, rowCount is calculated automatically and sliced data is returned */
984
- data?: T[];
985
- /** Pagination configuration */
986
- pagination?: UseTablePaginationConfig;
1106
+ interface UseTableOffsetOptions<T extends TableItem, TFilter = unknown> extends QueryOptions<TFilter> {
1107
+ mode: 'offset';
1108
+ getData: (params: OffsetParams<TFilter>) => Promise<OffsetResponse<T>>;
1109
+ paginationOptions?: PaginationOptions;
987
1110
  }
988
1111
  /** @public */
989
- interface UseTableResult<T = any> {
990
- /** Sliced data for current page */
991
- data?: T[];
992
- /** Props to pass to TablePagination component */
993
- paginationProps: TablePaginationProps;
994
- /** Pagination utilities */
995
- pagination: UseTablePagination<T>;
1112
+ interface UseTableCursorOptions<T extends TableItem, TFilter = unknown> extends QueryOptions<TFilter> {
1113
+ mode: 'cursor';
1114
+ getData: (params: CursorParams<TFilter>) => Promise<CursorResponse<T>>;
1115
+ paginationOptions?: Omit<PaginationOptions, 'initialOffset'>;
1116
+ }
1117
+ /** @public */
1118
+ type UseTableOptions<T extends TableItem, TFilter = unknown> = UseTableCompleteOptions<T, TFilter> | UseTableOffsetOptions<T, TFilter> | UseTableCursorOptions<T, TFilter>;
1119
+ /** @public */
1120
+ interface UseTableResult<T extends TableItem, TFilter = unknown> {
1121
+ tableProps: Omit<TableProps<T>, 'columnConfig' | 'rowConfig' | 'selection' | 'emptyState'>;
1122
+ reload: () => void;
1123
+ filter: FilterState<TFilter>;
1124
+ search: SearchState;
996
1125
  }
997
1126
 
998
- /**
999
- * Hook for managing table state including pagination and future features like sorting.
1000
- * Supports both controlled and uncontrolled modes using offset/pageSize pattern (Backstage style).
1001
- *
1002
- * @public
1003
- */
1004
- declare function useTable<T = any>(config?: UseTableConfig<T>): UseTableResult<T>;
1127
+ /** @public */
1128
+ declare function useTable<T extends TableItem, TFilter = unknown>(options: UseTableOptions<T, TFilter>): UseTableResult<T, TFilter>;
1005
1129
 
1006
1130
  /**
1007
1131
  * Component definition for Table
@@ -1029,25 +1153,8 @@ declare const TableDefinition: {
1029
1153
  readonly headSelection: "bui-TableHeadSelection";
1030
1154
  readonly cellSelection: "bui-TableCellSelection";
1031
1155
  };
1032
- };
1033
-
1034
- /**
1035
- * Pagination controls for Table components with page navigation and size selection.
1036
- *
1037
- * @public
1038
- */
1039
- declare function TablePagination(props: TablePaginationProps): react_jsx_runtime.JSX.Element;
1040
-
1041
- /**
1042
- * Component definition for TablePagination
1043
- * @public
1044
- */
1045
- declare const TablePaginationDefinition: {
1046
- readonly classNames: {
1047
- readonly root: "bui-TablePagination";
1048
- readonly left: "bui-TablePaginationLeft";
1049
- readonly right: "bui-TablePaginationRight";
1050
- readonly select: "bui-TablePaginationSelect";
1156
+ readonly dataAttributes: {
1157
+ readonly stale: readonly [true, false];
1051
1158
  };
1052
1159
  };
1053
1160
 
@@ -1522,5 +1629,5 @@ declare const useBreakpoint: () => {
1522
1629
  down: (key: Breakpoint) => boolean;
1523
1630
  };
1524
1631
 
1525
- export { Accordion, AccordionDefinition, AccordionGroup, AccordionPanel, AccordionTrigger, Avatar, AvatarDefinition, Box, BoxDefinition, Button, ButtonDefinition, ButtonIcon, ButtonIconDefinition, ButtonLink, ButtonLinkDefinition, Card, CardBody, CardDefinition, CardFooter, CardHeader, Cell, CellProfile, CellText, Checkbox, CheckboxDefinition, Column, Container, ContainerDefinition, Dialog, DialogBody, DialogDefinition, DialogFooter, DialogHeader, DialogTrigger, FieldLabel, FieldLabelDefinition, Flex, FlexDefinition, Grid, GridDefinition, GridItemDefinition, Header, HeaderDefinition, HeaderPage, HeaderPageDefinition, Link, LinkDefinition, Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuDefinition, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, Radio, RadioGroup, RadioGroupDefinition, Row, SearchField, SearchFieldDefinition, Select, SelectDefinition, Skeleton, SkeletonDefinition, SubmenuTrigger, Switch, SwitchDefinition, Tab, TabList, TabPanel, Table, TableBody, TableDefinition, TableHeader, TablePagination, TablePaginationDefinition, Tabs, TabsDefinition, Tag, TagGroup, TagGroupDefinition, Text, TextDefinition, TextField, TextFieldDefinition, Tooltip, TooltipDefinition, TooltipTrigger, VisuallyHidden, VisuallyHiddenDefinition, useBreakpoint, useTable };
1526
- export type { AccordionGroupProps, AccordionPanelProps, AccordionProps, AccordionTriggerProps, AlignItems, AvatarProps, Border, BorderRadius, BoxProps, Breakpoint, ButtonIconProps, ButtonLinkProps, ButtonProps, CardBodyProps, CardFooterProps, CardHeaderProps, CardProps, CellProfileProps, CellProps, CellTextProps, CheckboxProps, ClassNamesMap, ColumnProps, Columns, ComponentDefinition, ContainerProps, DataAttributeValues, DataAttributesMap, DialogBodyProps, DialogHeaderProps, DialogProps, DialogTriggerProps, Display, FieldLabelProps, FlexDirection, FlexProps, FlexWrap, GridItemProps, GridProps, HeaderPageBreadcrumb, HeaderPageProps, HeaderProps, HeaderTab, JustifyContent, LinkProps, MenuAutocompleteListBoxProps, MenuAutocompleteProps, MenuItemProps, MenuListBoxItemProps, MenuListBoxProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuTriggerProps, Option, RadioGroupProps, RadioProps, Responsive, SearchFieldProps, SelectProps, SkeletonProps, Space, SpaceProps, SubmenuTriggerProps, Surface, SwitchProps, TabListProps, TabMatchStrategy, TabPanelProps, TabProps, TablePaginationProps, TabsProps, TagGroupProps, TagProps, TextColorStatus, TextColors, TextFieldProps, TextOwnProps, TextProps, TextVariants, TextWeights, TooltipProps, UseTableConfig, UseTablePagination, UseTablePaginationConfig, UseTableResult, UtilityProps, VisuallyHiddenProps };
1632
+ export { Accordion, AccordionDefinition, AccordionGroup, AccordionPanel, AccordionTrigger, Avatar, AvatarDefinition, Box, BoxDefinition, Button, ButtonDefinition, ButtonIcon, ButtonIconDefinition, ButtonLink, ButtonLinkDefinition, Card, CardBody, CardDefinition, CardFooter, CardHeader, Cell, CellProfile, CellText, Checkbox, CheckboxDefinition, Column, Container, ContainerDefinition, Dialog, DialogBody, DialogDefinition, DialogFooter, DialogHeader, DialogTrigger, FieldLabel, FieldLabelDefinition, Flex, FlexDefinition, Grid, GridDefinition, GridItemDefinition, Header, HeaderDefinition, HeaderPage, HeaderPageDefinition, Link, LinkDefinition, Menu, MenuAutocomplete, MenuAutocompleteListbox, MenuDefinition, MenuItem, MenuListBox, MenuListBoxItem, MenuSection, MenuSeparator, MenuTrigger, Radio, 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, Tooltip, TooltipDefinition, TooltipTrigger, VisuallyHidden, VisuallyHiddenDefinition, useBreakpoint, useTable };
1633
+ export type { AccordionGroupProps, AccordionPanelProps, AccordionProps, AccordionTriggerProps, AlignItems, AvatarProps, Border, BorderRadius, BoxProps, Breakpoint, ButtonIconProps, ButtonLinkProps, ButtonProps, CardBodyProps, CardFooterProps, CardHeaderProps, CardProps, CellProfileProps, CellProps, CellTextProps, CheckboxProps, ClassNamesMap, ColumnConfig, ColumnProps, Columns, ComponentDefinition, ContainerProps, CursorParams, CursorResponse, DataAttributeValues, DataAttributesMap, DialogBodyProps, DialogHeaderProps, DialogProps, DialogTriggerProps, Display, FieldLabelProps, FilterState, FlexDirection, FlexProps, FlexWrap, GridItemProps, GridProps, HeaderPageBreadcrumb, HeaderPageProps, HeaderProps, HeaderTab, JustifyContent, LinkProps, MenuAutocompleteListBoxProps, MenuAutocompleteProps, MenuItemProps, MenuListBoxItemProps, MenuListBoxProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuTriggerProps, NoPagination, OffsetParams, OffsetResponse, Option, PagePagination, PaginationOptions, QueryOptions, RadioGroupProps, RadioProps, Responsive, RowConfig, RowRenderFn, SearchFieldProps, SearchState, SelectProps, SkeletonProps, SortDescriptor, SortState, Space, SpaceProps, SubmenuTriggerProps, Surface, SwitchProps, TabListProps, TabMatchStrategy, TabPanelProps, TabProps, TableItem, TablePaginationProps, TablePaginationType, TableProps, TableRootProps, TableSelection, TabsProps, TagGroupProps, TagProps, TextColorStatus, TextColors, TextFieldProps, TextOwnProps, TextProps, TextVariants, TextWeights, TooltipProps, UseTableCompleteOptions, UseTableCursorOptions, UseTableOffsetOptions, UseTableOptions, UseTableResult, UtilityProps, VisuallyHiddenProps };
package/dist/index.esm.js CHANGED
@@ -31,6 +31,7 @@ export { CheckboxDefinition } from './components/Checkbox/definition.esm.js';
31
31
  export { Radio, RadioGroup } from './components/RadioGroup/RadioGroup.esm.js';
32
32
  export { RadioGroupDefinition } from './components/RadioGroup/definition.esm.js';
33
33
  export { Table } from './components/Table/components/Table.esm.js';
34
+ export { TableRoot } from './components/Table/components/TableRoot.esm.js';
34
35
  export { TableHeader } from './components/Table/components/TableHeader.esm.js';
35
36
  export { TableBody } from './components/Table/components/TableBody.esm.js';
36
37
  export { Column } from './components/Table/components/Column.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/ui",
3
- "version": "0.0.0-nightly-20260108025012",
3
+ "version": "0.0.0-nightly-20260109025055",
4
4
  "backstage": {
5
5
  "role": "web-library"
6
6
  },
@@ -47,7 +47,7 @@
47
47
  "react-aria-components": "^1.13.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@backstage/cli": "0.0.0-nightly-20260108025012",
50
+ "@backstage/cli": "0.0.0-nightly-20260109025055",
51
51
  "@types/react": "^18.0.0",
52
52
  "@types/react-dom": "^18.0.0",
53
53
  "chalk": "^5.4.1",