@redis-ui/table 3.3.2 → 3.5.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.
Files changed (39) hide show
  1. package/dist/Table/Table.cjs +4 -1
  2. package/dist/Table/Table.d.ts +22 -3
  3. package/dist/Table/Table.js +4 -1
  4. package/dist/Table/Table.style.cjs +19 -18
  5. package/dist/Table/Table.style.d.ts +13 -2
  6. package/dist/Table/Table.style.js +20 -19
  7. package/dist/Table/Table.types.d.ts +7 -0
  8. package/dist/Table/components/PluggableTable/compositionComponents.d.ts +21 -2
  9. package/dist/Table/components/TableBodyCell/components/CellContainers/CellContainers.cjs +21 -0
  10. package/dist/Table/components/TableBodyCell/components/CellContainers/CellContainers.d.ts +2 -0
  11. package/dist/Table/components/TableBodyCell/components/CellContainers/CellContainers.js +21 -0
  12. package/dist/Table/components/TableBodyCell/components/CellContainers/CellContainers.style.cjs +16 -0
  13. package/dist/Table/components/TableBodyCell/components/CellContainers/CellContainers.style.d.ts +3 -0
  14. package/dist/Table/components/TableBodyCell/components/CellContainers/CellContainers.style.js +14 -0
  15. package/dist/Table/components/TableBodyCell/components/CellContainers/CellContainers.test.d.ts +1 -0
  16. package/dist/Table/components/TableBodyCell/components/Compose/Compose.cjs +12 -3
  17. package/dist/Table/components/TableBodyCell/components/Compose/Compose.js +12 -3
  18. package/dist/Table/components/TableBottomBar/TableBottomBar.cjs +5 -2
  19. package/dist/Table/components/TableBottomBar/TableBottomBar.d.ts +3 -1
  20. package/dist/Table/components/TableBottomBar/TableBottomBar.js +5 -2
  21. package/dist/Table/components/TableTopBar/TableTopBar.cjs +10 -2
  22. package/dist/Table/components/TableTopBar/TableTopBar.d.ts +19 -1
  23. package/dist/Table/components/TableTopBar/TableTopBar.js +11 -3
  24. package/dist/Table/components/TableTopBar/components/Divider/Divider.cjs +9 -0
  25. package/dist/Table/components/TableTopBar/components/Divider/Divider.d.ts +2 -0
  26. package/dist/Table/components/TableTopBar/components/Divider/Divider.js +9 -0
  27. package/dist/Table/components/TableTopBar/components/Divider/Divider.test.d.ts +1 -0
  28. package/dist/Table/components/TableTopBar/components/Title/Title.cjs +15 -0
  29. package/dist/Table/components/TableTopBar/components/Title/Title.d.ts +4 -0
  30. package/dist/Table/components/TableTopBar/components/Title/Title.js +15 -0
  31. package/dist/Table/components/TableTopBar/components/Title/Title.test.d.ts +1 -0
  32. package/dist/Table/components/TableTopBar/components/TitleGroup/TitleGroup.cjs +20 -0
  33. package/dist/Table/components/TableTopBar/components/TitleGroup/TitleGroup.d.ts +2 -0
  34. package/dist/Table/components/TableTopBar/components/TitleGroup/TitleGroup.js +20 -0
  35. package/dist/Table/components/TableTopBar/components/TitleGroup/TitleGroup.test.d.ts +1 -0
  36. package/dist/Table/components/TableTopBar/components/TitleGroup/TitleGroup.types.d.ts +10 -0
  37. package/dist/Table/tanStackExtendedTypes.d.ts +3 -1
  38. package/dist/Table/utils/plugin.utils.d.ts +1 -1
  39. package/package.json +4 -4
@@ -71,6 +71,8 @@ const Table = Object.assign(({
71
71
  filterFns,
72
72
  // column visibility
73
73
  columnVisibility,
74
+ // meta
75
+ meta,
74
76
  // rest
75
77
  ...restProps
76
78
  }) => {
@@ -140,7 +142,8 @@ const Table = Object.assign(({
140
142
  emptyStateRender: emptyState
141
143
  },
142
144
  tableOptions: {
143
- getRowId
145
+ getRowId,
146
+ meta
144
147
  },
145
148
  pluginsData: [clickableRowPluginData, sortingPluginData, columnVisibilityPluginData, filteringPluginData, paginationPluginData, expandableRowPluginData, rowSelectionPluginData, rowNavigationPluginData]
146
149
  });
@@ -2,10 +2,29 @@
2
2
  import './tanStackExtendedTypes';
3
3
  import type { Row } from '@tanstack/react-table';
4
4
  import { TableProps } from './Table.types';
5
- declare const Table: (<T extends object>({ columns, caption, onRowClick, data, getRowId, emptyState, minWidth, stripedRows, enableSorting, defaultSorting, onSortingChange, sorting, manualSorting, defaultExpanded, expanded, onExpandedChange, getIsRowExpandable, renderExpandedRow, expandRowOnClick, expandedRowComponent, getSubRows, pagination, defaultPagination, onPaginationChange, manualPagination, totalRowCount, totalPageCount, pageSizes, paginationEnabled, rowSelection, defaultRowSelection, onRowSelectionChange, rowSelectionMode, getRowCanSelect, selectRowOnClick, enableRowNavigation, enableFiltering, columnFilters, globalFilter, globalFilterFn, filterFns, columnVisibility, ...restProps }: TableProps<T>) => import("react/jsx-runtime").JSX.Element) & {
5
+ declare const Table: (<T extends object>({ columns, caption, onRowClick, data, getRowId, emptyState, minWidth, stripedRows, enableSorting, defaultSorting, onSortingChange, sorting, manualSorting, defaultExpanded, expanded, onExpandedChange, getIsRowExpandable, renderExpandedRow, expandRowOnClick, expandedRowComponent, getSubRows, pagination, defaultPagination, onPaginationChange, manualPagination, totalRowCount, totalPageCount, pageSizes, paginationEnabled, rowSelection, defaultRowSelection, onRowSelectionChange, rowSelectionMode, getRowCanSelect, selectRowOnClick, enableRowNavigation, enableFiltering, columnFilters, globalFilter, globalFilterFn, filterFns, columnVisibility, meta, ...restProps }: TableProps<T>) => import("react/jsx-runtime").JSX.Element) & {
6
6
  Compose: <T_1 extends object>({ data, columns, pluginsData, tableOptions, components, minWidth, stripedRows, ...restProps }: import("./components/Compose/Compose").TableComposeProps<T_1>) => import("react/jsx-runtime").JSX.Element;
7
- TopBar: (props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element | null;
8
- BottomBar: (props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element | null;
7
+ TopBar: ((props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element | null) & {
8
+ Divider: (props: Omit<import("@redislabsdev/redis-ui-components").FlexDividerProps, "orientation">) => import("react/jsx-runtime").JSX.Element;
9
+ Title: ({ text, ...restProps }: import("@redislabsdev/redis-ui-components").ChildFree<import("@redislabsdev/redis-ui-components").TypographyHeadingProps> & {
10
+ text: string;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ TitleGroup: ({ icon: Icon, title, infoTip, ...restProps }: import("./components/TableTopBar/components/TitleGroup/TitleGroup.types").TableTopBarTitleGroupProps) => import("react/jsx-runtime").JSX.Element;
13
+ SearchInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@redislabsdev/redis-ui-components/dist/Inputs/components/Compose/TextCompose.types").TextInputComposeProps, "parser" | "formatter" | "readOnly"> & import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").InputTagProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/ResetButton/ResetButton.types").ResetButtonProps & import("@redislabsdev/redis-ui-components").RestInputProps & import("react").RefAttributes<HTMLInputElement>> & {
14
+ Compose: ({ value, defaultValue, onChange, parser, formatter, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Inputs/components/Compose/CommonCompose.types").CommonInputComposeProps & Omit<import("@redislabsdev/redis-ui-components/dist/Inputs/components/Context/InputValueProvider").InputValueProviderProps, "children"> & Omit<import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>, "onChange" | "defaultValue"> & {
15
+ readonlyRender?: import("@redislabsdev/redis-ui-components/dist/Inputs/components/ReadonlyRender/ReadonlyRender.types").ReadOnlyRenderComponent | undefined;
16
+ readonlyProps?: import("react").HTMLAttributes<HTMLElement> | undefined;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
+ ResetButton: ({ size, icon, allowReset, onClick, onMouseDown, ...restProps }: Partial<import("@redislabsdev/redis-ui-components").IconButtonProps> & import("@redislabsdev/redis-ui-components/dist/Inputs/components/ResetButton/ResetButton.types").ResetButtonProps) => import("react/jsx-runtime").JSX.Element | null;
19
+ Tag: import("react").ForwardRefExoticComponent<import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").InputTagProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").RestInputTagProps & import("react").RefAttributes<HTMLInputElement>>;
20
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redislabsdev/redis-ui-icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
21
+ LoadingIndicator: ({ loading, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
22
+ SearchIcon: () => import("react/jsx-runtime").JSX.Element;
23
+ }, any, {}, never>;
24
+ };
25
+ BottomBar: ((props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element | null) & {
26
+ Divider: (props: Omit<import("@redislabsdev/redis-ui-components").FlexDividerProps, "orientation">) => import("react/jsx-runtime").JSX.Element;
27
+ };
9
28
  Root: (props: import("react").HTMLAttributes<HTMLTableElement>) => import("react/jsx-runtime").JSX.Element;
10
29
  SRCaption: ({ caption }: {
11
30
  caption?: string | undefined;
@@ -69,6 +69,8 @@ const Table = Object.assign(({
69
69
  filterFns,
70
70
  // column visibility
71
71
  columnVisibility,
72
+ // meta
73
+ meta,
72
74
  // rest
73
75
  ...restProps
74
76
  }) => {
@@ -138,7 +140,8 @@ const Table = Object.assign(({
138
140
  emptyStateRender: emptyState
139
141
  },
140
142
  tableOptions: {
141
- getRowId
143
+ getRowId,
144
+ meta
142
145
  },
143
146
  pluginsData: [clickableRowPluginData, sortingPluginData, columnVisibilityPluginData, filteringPluginData, paginationPluginData, expandableRowPluginData, rowSelectionPluginData, rowNavigationPluginData]
144
147
  });
@@ -22,14 +22,16 @@ const TableScroller = _styled__default.default.div.withConfig({
22
22
  overflow-x: ${table.getRowModel().rows.length ? "auto" : "hidden"};
23
23
  `;
24
24
  });
25
- const TableTopBar = _styled__default.default.div.withConfig({
26
- displayName: "Tablestyle__TableTopBar",
25
+ const TableSearchInput = _styled__default.default(redisUiComponents.SearchInput).withConfig({
26
+ displayName: "Tablestyle__TableSearchInput",
27
27
  componentId: "RedisUI__sc-o0xfty-2"
28
+ })(["width:", ";border-color:", ";&:where(:hover,:has(input:not(:placeholder-shown))){border-color:", ";}"], () => redisUiStyles.useTheme().components.tableHeading.searchInput.width, () => redisUiStyles.useTheme().components.tableHeading.searchInput.states.normal.borderColor, () => redisUiStyles.useTheme().components.tableHeading.searchInput.states.hover.borderColor);
29
+ const TableTopBar = _styled__default.default(redisUiComponents.FlexGroup).withConfig({
30
+ displayName: "Tablestyle__TableTopBar",
31
+ componentId: "RedisUI__sc-o0xfty-3"
28
32
  })(["", ""], () => {
29
33
  const styles = redisUiStyles.useTheme().components.table.table.topBar;
30
34
  return _styled.css`
31
- display: flex;
32
- align-items: center;
33
35
  gap: ${styles.gap};
34
36
  padding: ${styles.padding};
35
37
  min-height: ${styles.minHeight};
@@ -37,14 +39,12 @@ const TableTopBar = _styled__default.default.div.withConfig({
37
39
  background-color: ${styles.bgColor};
38
40
  `;
39
41
  });
40
- const TableBottomBar = _styled__default.default.div.withConfig({
42
+ const TableBottomBar = _styled__default.default(redisUiComponents.FlexGroup).withConfig({
41
43
  displayName: "Tablestyle__TableBottomBar",
42
- componentId: "RedisUI__sc-o0xfty-3"
44
+ componentId: "RedisUI__sc-o0xfty-4"
43
45
  })(["", ""], () => {
44
46
  const styles = redisUiStyles.useTheme().components.table.table.bottomBar;
45
47
  return _styled.css`
46
- display: flex;
47
- align-items: center;
48
48
  gap: ${styles.gap};
49
49
  padding: ${styles.padding};
50
50
  min-height: ${styles.minHeight};
@@ -54,7 +54,7 @@ const TableBottomBar = _styled__default.default.div.withConfig({
54
54
  });
55
55
  const Table = _styled__default.default.table.withConfig({
56
56
  displayName: "Tablestyle__Table",
57
- componentId: "RedisUI__sc-o0xfty-4"
57
+ componentId: "RedisUI__sc-o0xfty-5"
58
58
  })(["border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed;min-width:", ";"], () => {
59
59
  const {
60
60
  table,
@@ -67,21 +67,21 @@ const TableHead = _styled__default.default.thead.attrs((props) => ({
67
67
  ...props
68
68
  })).withConfig({
69
69
  displayName: "Tablestyle__TableHead",
70
- componentId: "RedisUI__sc-o0xfty-5"
70
+ componentId: "RedisUI__sc-o0xfty-6"
71
71
  })(["position:sticky;top:0;z-index:3;background-color:", ";"], () => redisUiStyles.useTheme().components.table.table.tableHeaderRow.bgColor);
72
72
  const TableHeaderRow = _styled__default.default.tr.withConfig({
73
73
  displayName: "Tablestyle__TableHeaderRow",
74
- componentId: "RedisUI__sc-o0xfty-6"
74
+ componentId: "RedisUI__sc-o0xfty-7"
75
75
  })(["height:", ";"], () => redisUiStyles.useTheme().components.table.table.tableHeaderRow.minHeight);
76
76
  const SortableHeadingCompose = _styled__default.default.button.withConfig({
77
77
  displayName: "Tablestyle__SortableHeadingCompose",
78
- componentId: "RedisUI__sc-o0xfty-7"
78
+ componentId: "RedisUI__sc-o0xfty-8"
79
79
  })(["all:unset;border-radius:0.03rem;display:flex;align-items:center;justify-content:flex-start;gap:0.8rem;height:100%;width:100%;min-height:35px;max-width:100%;overflow:", ";", " svg{flex:none;}"], ({
80
80
  $custom
81
81
  }) => $custom ? void 0 : "hidden", redisUiStyles.getFocusStyle("0.6rem"));
82
82
  const HeaderTitleWrapper = _styled__default.default(redisUiComponents.Typography.Body).withConfig({
83
83
  displayName: "Tablestyle__HeaderTitleWrapper",
84
- componentId: "RedisUI__sc-o0xfty-8"
84
+ componentId: "RedisUI__sc-o0xfty-9"
85
85
  })(["flex:0 1 auto;white-space:inherit;text-align:start;", ""], ({
86
86
  $isTextual
87
87
  }) => $isTextual ? null : _styled.css`
@@ -91,15 +91,15 @@ const HeaderTitleWrapper = _styled__default.default(redisUiComponents.Typography
91
91
  `);
92
92
  const TableHeaderCell = _styled__default.default.th.withConfig({
93
93
  displayName: "Tablestyle__TableHeaderCell",
94
- componentId: "RedisUI__sc-o0xfty-9"
94
+ componentId: "RedisUI__sc-o0xfty-10"
95
95
  })(["padding:", ";color:", ";user-select:none;white-space:nowrap;word-break:break-word;line-height:normal;position:relative;overflow:hidden;border-bottom:", " solid ", ";&[aria-sort]{cursor:pointer;}&:not(:last-child)::after{content:'';position:absolute;inset-inline-end:0;inset-block:", ";border-right:", " solid ", ";}"], () => redisUiStyles.useTheme().components.table.table.tableHeaderCell.padding, () => redisUiStyles.useTheme().components.table.table.tableHeaderCell.color, () => redisUiStyles.useTheme().components.table.table.tableHeaderRow.separator.width, () => redisUiStyles.useTheme().components.table.table.tableHeaderRow.separator.color, () => redisUiStyles.useTheme().components.table.table.tableHeaderCell.separator.blockPadding, () => redisUiStyles.useTheme().components.table.table.tableHeaderCell.separator.width, () => redisUiStyles.useTheme().components.table.table.tableHeaderCell.separator.color);
96
96
  const TableBody = _styled__default.default.tbody.withConfig({
97
97
  displayName: "Tablestyle__TableBody",
98
- componentId: "RedisUI__sc-o0xfty-10"
98
+ componentId: "RedisUI__sc-o0xfty-11"
99
99
  })([""]);
100
100
  const TableBodyRow = _styled__default.default.tr.withConfig({
101
101
  displayName: "Tablestyle__TableBodyRow",
102
- componentId: "RedisUI__sc-o0xfty-11"
102
+ componentId: "RedisUI__sc-o0xfty-12"
103
103
  })(["> *{border-top:", " solid transparent;}&:not(:first-child) > *{border-top-color:", ";}height:", ";transition:box-shadow 0.2s ease-in-out;position:relative;&:hover,&:focus,&:focus-within{cursor:", ";z-index:1;box-shadow:", ";", "{opacity:1;visibility:visible;}}", ""], () => redisUiStyles.useTheme().components.table.table.tableBodyRow.separator.width, () => redisUiStyles.useTheme().components.table.table.tableBodyRow.separator.color, () => redisUiStyles.useTheme().components.table.table.tableBodyRow.minHeight, ({
104
104
  onClick
105
105
  }) => onClick ? "pointer" : "default", () => redisUiStyles.useTheme().components.table.table.tableBodyRow.hoverBoxShadow, ShowOnRowHover_style.ShowOnRowHover, ({
@@ -111,11 +111,11 @@ const TableBodyRow = _styled__default.default.tr.withConfig({
111
111
  `);
112
112
  const TableBodyCell = _styled__default.default.td.withConfig({
113
113
  displayName: "Tablestyle__TableBodyCell",
114
- componentId: "RedisUI__sc-o0xfty-12"
114
+ componentId: "RedisUI__sc-o0xfty-13"
115
115
  })(["color:", ";padding:", ";text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"], () => redisUiStyles.useTheme().components.table.table.tableBodyCell.color, () => redisUiStyles.useTheme().components.table.table.tableBodyCell.padding);
116
116
  const EmptyStateContainer = _styled__default.default.div.withConfig({
117
117
  displayName: "Tablestyle__EmptyStateContainer",
118
- componentId: "RedisUI__sc-o0xfty-13"
118
+ componentId: "RedisUI__sc-o0xfty-14"
119
119
  })(["text-align:center;"]);
120
120
  exports.EmptyStateContainer = EmptyStateContainer;
121
121
  exports.HeaderTitleWrapper = HeaderTitleWrapper;
@@ -130,4 +130,5 @@ exports.TableHead = TableHead;
130
130
  exports.TableHeaderCell = TableHeaderCell;
131
131
  exports.TableHeaderRow = TableHeaderRow;
132
132
  exports.TableScroller = TableScroller;
133
+ exports.TableSearchInput = TableSearchInput;
133
134
  exports.TableTopBar = TableTopBar;
@@ -2,8 +2,19 @@
2
2
  /// <reference types="react" />
3
3
  export declare const TableContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const TableScroller: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const TableTopBar: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const TableBottomBar: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const TableSearchInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@redislabsdev/redis-ui-components/dist/Inputs/components/Compose/TextCompose.types").TextInputComposeProps, "parser" | "formatter" | "readOnly"> & import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").InputTagProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/ResetButton/ResetButton.types").ResetButtonProps & import("@redislabsdev/redis-ui-components").RestInputProps & import("react").RefAttributes<HTMLInputElement>> & {
6
+ Compose: ({ value, defaultValue, onChange, parser, formatter, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Inputs/components/Compose/CommonCompose.types").CommonInputComposeProps & Omit<import("@redislabsdev/redis-ui-components/dist/Inputs/components/Context/InputValueProvider").InputValueProviderProps, "children"> & Omit<import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>, "onChange" | "defaultValue"> & {
7
+ readonlyRender?: import("@redislabsdev/redis-ui-components/dist/Inputs/components/ReadonlyRender/ReadonlyRender.types").ReadOnlyRenderComponent | undefined;
8
+ readonlyProps?: import("react").HTMLAttributes<HTMLElement> | undefined;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ ResetButton: ({ size, icon, allowReset, onClick, onMouseDown, ...restProps }: Partial<import("@redislabsdev/redis-ui-components").IconButtonProps> & import("@redislabsdev/redis-ui-components/dist/Inputs/components/ResetButton/ResetButton.types").ResetButtonProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ Tag: import("react").ForwardRefExoticComponent<import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").InputTagProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").RestInputTagProps & import("react").RefAttributes<HTMLInputElement>>;
12
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redislabsdev/redis-ui-icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
13
+ LoadingIndicator: ({ loading, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
14
+ SearchIcon: () => import("react/jsx-runtime").JSX.Element;
15
+ }, any, {}, never>;
16
+ export declare const TableTopBar: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("@redislabsdev/redis-ui-components").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
17
+ export declare const TableBottomBar: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("@redislabsdev/redis-ui-components").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
7
18
  export declare const Table: import("styled-components").StyledComponent<"table", any, {}, never>;
8
19
  export declare const TableHead: import("styled-components").StyledComponent<"thead", any, {
9
20
  id?: string | undefined;
@@ -1,6 +1,6 @@
1
1
  import _styled, { css } from "styled-components";
2
2
  import { useTheme, getFocusStyle } from "@redislabsdev/redis-ui-styles";
3
- import { Typography } from "@redislabsdev/redis-ui-components";
3
+ import { SearchInput, FlexGroup, Typography } from "@redislabsdev/redis-ui-components";
4
4
  import { ShowOnRowHover } from "./components/ShowOnRowHover/ShowOnRowHover.style.js";
5
5
  import { useTableContext } from "./Table.context.js";
6
6
  const TableContainer = _styled.div.withConfig({
@@ -18,14 +18,16 @@ const TableScroller = _styled.div.withConfig({
18
18
  overflow-x: ${table.getRowModel().rows.length ? "auto" : "hidden"};
19
19
  `;
20
20
  });
21
- const TableTopBar = _styled.div.withConfig({
22
- displayName: "Tablestyle__TableTopBar",
21
+ const TableSearchInput = _styled(SearchInput).withConfig({
22
+ displayName: "Tablestyle__TableSearchInput",
23
23
  componentId: "RedisUI__sc-o0xfty-2"
24
+ })(["width:", ";border-color:", ";&:where(:hover,:has(input:not(:placeholder-shown))){border-color:", ";}"], () => useTheme().components.tableHeading.searchInput.width, () => useTheme().components.tableHeading.searchInput.states.normal.borderColor, () => useTheme().components.tableHeading.searchInput.states.hover.borderColor);
25
+ const TableTopBar = _styled(FlexGroup).withConfig({
26
+ displayName: "Tablestyle__TableTopBar",
27
+ componentId: "RedisUI__sc-o0xfty-3"
24
28
  })(["", ""], () => {
25
29
  const styles = useTheme().components.table.table.topBar;
26
30
  return css`
27
- display: flex;
28
- align-items: center;
29
31
  gap: ${styles.gap};
30
32
  padding: ${styles.padding};
31
33
  min-height: ${styles.minHeight};
@@ -33,14 +35,12 @@ const TableTopBar = _styled.div.withConfig({
33
35
  background-color: ${styles.bgColor};
34
36
  `;
35
37
  });
36
- const TableBottomBar = _styled.div.withConfig({
38
+ const TableBottomBar = _styled(FlexGroup).withConfig({
37
39
  displayName: "Tablestyle__TableBottomBar",
38
- componentId: "RedisUI__sc-o0xfty-3"
40
+ componentId: "RedisUI__sc-o0xfty-4"
39
41
  })(["", ""], () => {
40
42
  const styles = useTheme().components.table.table.bottomBar;
41
43
  return css`
42
- display: flex;
43
- align-items: center;
44
44
  gap: ${styles.gap};
45
45
  padding: ${styles.padding};
46
46
  min-height: ${styles.minHeight};
@@ -50,7 +50,7 @@ const TableBottomBar = _styled.div.withConfig({
50
50
  });
51
51
  const Table = _styled.table.withConfig({
52
52
  displayName: "Tablestyle__Table",
53
- componentId: "RedisUI__sc-o0xfty-4"
53
+ componentId: "RedisUI__sc-o0xfty-5"
54
54
  })(["border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed;min-width:", ";"], () => {
55
55
  const {
56
56
  table,
@@ -63,21 +63,21 @@ const TableHead = _styled.thead.attrs((props) => ({
63
63
  ...props
64
64
  })).withConfig({
65
65
  displayName: "Tablestyle__TableHead",
66
- componentId: "RedisUI__sc-o0xfty-5"
66
+ componentId: "RedisUI__sc-o0xfty-6"
67
67
  })(["position:sticky;top:0;z-index:3;background-color:", ";"], () => useTheme().components.table.table.tableHeaderRow.bgColor);
68
68
  const TableHeaderRow = _styled.tr.withConfig({
69
69
  displayName: "Tablestyle__TableHeaderRow",
70
- componentId: "RedisUI__sc-o0xfty-6"
70
+ componentId: "RedisUI__sc-o0xfty-7"
71
71
  })(["height:", ";"], () => useTheme().components.table.table.tableHeaderRow.minHeight);
72
72
  const SortableHeadingCompose = _styled.button.withConfig({
73
73
  displayName: "Tablestyle__SortableHeadingCompose",
74
- componentId: "RedisUI__sc-o0xfty-7"
74
+ componentId: "RedisUI__sc-o0xfty-8"
75
75
  })(["all:unset;border-radius:0.03rem;display:flex;align-items:center;justify-content:flex-start;gap:0.8rem;height:100%;width:100%;min-height:35px;max-width:100%;overflow:", ";", " svg{flex:none;}"], ({
76
76
  $custom
77
77
  }) => $custom ? void 0 : "hidden", getFocusStyle("0.6rem"));
78
78
  const HeaderTitleWrapper = _styled(Typography.Body).withConfig({
79
79
  displayName: "Tablestyle__HeaderTitleWrapper",
80
- componentId: "RedisUI__sc-o0xfty-8"
80
+ componentId: "RedisUI__sc-o0xfty-9"
81
81
  })(["flex:0 1 auto;white-space:inherit;text-align:start;", ""], ({
82
82
  $isTextual
83
83
  }) => $isTextual ? null : css`
@@ -87,15 +87,15 @@ const HeaderTitleWrapper = _styled(Typography.Body).withConfig({
87
87
  `);
88
88
  const TableHeaderCell = _styled.th.withConfig({
89
89
  displayName: "Tablestyle__TableHeaderCell",
90
- componentId: "RedisUI__sc-o0xfty-9"
90
+ componentId: "RedisUI__sc-o0xfty-10"
91
91
  })(["padding:", ";color:", ";user-select:none;white-space:nowrap;word-break:break-word;line-height:normal;position:relative;overflow:hidden;border-bottom:", " solid ", ";&[aria-sort]{cursor:pointer;}&:not(:last-child)::after{content:'';position:absolute;inset-inline-end:0;inset-block:", ";border-right:", " solid ", ";}"], () => useTheme().components.table.table.tableHeaderCell.padding, () => useTheme().components.table.table.tableHeaderCell.color, () => useTheme().components.table.table.tableHeaderRow.separator.width, () => useTheme().components.table.table.tableHeaderRow.separator.color, () => useTheme().components.table.table.tableHeaderCell.separator.blockPadding, () => useTheme().components.table.table.tableHeaderCell.separator.width, () => useTheme().components.table.table.tableHeaderCell.separator.color);
92
92
  const TableBody = _styled.tbody.withConfig({
93
93
  displayName: "Tablestyle__TableBody",
94
- componentId: "RedisUI__sc-o0xfty-10"
94
+ componentId: "RedisUI__sc-o0xfty-11"
95
95
  })([""]);
96
96
  const TableBodyRow = _styled.tr.withConfig({
97
97
  displayName: "Tablestyle__TableBodyRow",
98
- componentId: "RedisUI__sc-o0xfty-11"
98
+ componentId: "RedisUI__sc-o0xfty-12"
99
99
  })(["> *{border-top:", " solid transparent;}&:not(:first-child) > *{border-top-color:", ";}height:", ";transition:box-shadow 0.2s ease-in-out;position:relative;&:hover,&:focus,&:focus-within{cursor:", ";z-index:1;box-shadow:", ";", "{opacity:1;visibility:visible;}}", ""], () => useTheme().components.table.table.tableBodyRow.separator.width, () => useTheme().components.table.table.tableBodyRow.separator.color, () => useTheme().components.table.table.tableBodyRow.minHeight, ({
100
100
  onClick
101
101
  }) => onClick ? "pointer" : "default", () => useTheme().components.table.table.tableBodyRow.hoverBoxShadow, ShowOnRowHover, ({
@@ -107,11 +107,11 @@ const TableBodyRow = _styled.tr.withConfig({
107
107
  `);
108
108
  const TableBodyCell = _styled.td.withConfig({
109
109
  displayName: "Tablestyle__TableBodyCell",
110
- componentId: "RedisUI__sc-o0xfty-12"
110
+ componentId: "RedisUI__sc-o0xfty-13"
111
111
  })(["color:", ";padding:", ";text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"], () => useTheme().components.table.table.tableBodyCell.color, () => useTheme().components.table.table.tableBodyCell.padding);
112
112
  const EmptyStateContainer = _styled.div.withConfig({
113
113
  displayName: "Tablestyle__EmptyStateContainer",
114
- componentId: "RedisUI__sc-o0xfty-13"
114
+ componentId: "RedisUI__sc-o0xfty-14"
115
115
  })(["text-align:center;"]);
116
116
  export {
117
117
  EmptyStateContainer,
@@ -127,5 +127,6 @@ export {
127
127
  TableHeaderCell,
128
128
  TableHeaderRow,
129
129
  TableScroller,
130
+ TableSearchInput,
130
131
  TableTopBar
131
132
  };
@@ -1,3 +1,5 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { TableMeta } from '@tanstack/react-table';
1
3
  import { TableExpandableRowParams } from './plugins/ExpandableRowPlugin';
2
4
  import { TablePaginationParams } from './plugins/PaginationPlugin';
3
5
  import { TableRowSelectionParams } from './plugins/RowSelectionPlugin';
@@ -14,7 +16,12 @@ export interface TableProps<T extends object> extends TableSortingParams, TableC
14
16
  getRowId?: (rowData: T, index: number) => string;
15
17
  onRowClick?: (rowData: T) => void;
16
18
  emptyState?: OwnPluggableTableProps<T>['emptyStateRender'];
19
+ meta?: TableMeta<T>;
17
20
  }
18
21
  export type ColumnSizeUnit = 'fraction' | 'px' | 'rem';
19
22
  /** @deprecated use {@link ColumnSizeUnit} instead */
20
23
  export type CellSizingUnits = ColumnSizeUnit;
24
+ export type CellContainerComponent = ({ children }: {
25
+ children: ReactNode;
26
+ }) => ReactElement;
27
+ export type ColumnCellContainer = 'flex' | 'ellipsis' | CellContainerComponent;
@@ -2,8 +2,27 @@
2
2
  import { SRSortingNotification } from '../TableHeaderCell/SRSortingNotification';
3
3
  export declare const compositionComponents: {
4
4
  Compose: <T extends object>({ data, columns, pluginsData, tableOptions, components, minWidth, stripedRows, ...restProps }: import("../Compose/Compose").TableComposeProps<T>) => import("react/jsx-runtime").JSX.Element;
5
- TopBar: (props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element | null;
6
- BottomBar: (props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element | null;
5
+ TopBar: ((props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element | null) & {
6
+ Divider: (props: Omit<import("@redislabsdev/redis-ui-components").FlexDividerProps, "orientation">) => import("react/jsx-runtime").JSX.Element;
7
+ Title: ({ text, ...restProps }: import("@redislabsdev/redis-ui-components").ChildFree<import("@redislabsdev/redis-ui-components").TypographyHeadingProps> & {
8
+ text: string;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ TitleGroup: ({ icon: Icon, title, infoTip, ...restProps }: import("../TableTopBar/components/TitleGroup/TitleGroup.types").TableTopBarTitleGroupProps) => import("react/jsx-runtime").JSX.Element;
11
+ SearchInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@redislabsdev/redis-ui-components/dist/Inputs/components/Compose/TextCompose.types").TextInputComposeProps, "parser" | "formatter" | "readOnly"> & import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").InputTagProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/ResetButton/ResetButton.types").ResetButtonProps & import("@redislabsdev/redis-ui-components").RestInputProps & import("react").RefAttributes<HTMLInputElement>> & {
12
+ Compose: ({ value, defaultValue, onChange, parser, formatter, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Inputs/components/Compose/CommonCompose.types").CommonInputComposeProps & Omit<import("@redislabsdev/redis-ui-components/dist/Inputs/components/Context/InputValueProvider").InputValueProviderProps, "children"> & Omit<import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>, "onChange" | "defaultValue"> & {
13
+ readonlyRender?: import("@redislabsdev/redis-ui-components/dist/Inputs/components/ReadonlyRender/ReadonlyRender.types").ReadOnlyRenderComponent | undefined;
14
+ readonlyProps?: import("react").HTMLAttributes<HTMLElement> | undefined;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ ResetButton: ({ size, icon, allowReset, onClick, onMouseDown, ...restProps }: Partial<import("@redislabsdev/redis-ui-components").IconButtonProps> & import("@redislabsdev/redis-ui-components/dist/Inputs/components/ResetButton/ResetButton.types").ResetButtonProps) => import("react/jsx-runtime").JSX.Element | null;
17
+ Tag: import("react").ForwardRefExoticComponent<import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").InputTagProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").RestInputTagProps & import("react").RefAttributes<HTMLInputElement>>;
18
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redislabsdev/redis-ui-icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
19
+ LoadingIndicator: ({ loading, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
20
+ SearchIcon: () => import("react/jsx-runtime").JSX.Element;
21
+ }, any, {}, never>;
22
+ };
23
+ BottomBar: ((props: import("@redislabsdev/redis-ui-components").ComposeElementProps<HTMLElement>) => import("react/jsx-runtime").JSX.Element | null) & {
24
+ Divider: (props: Omit<import("@redislabsdev/redis-ui-components").FlexDividerProps, "orientation">) => import("react/jsx-runtime").JSX.Element;
25
+ };
7
26
  Root: (props: import("react").HTMLAttributes<HTMLTableElement>) => import("react/jsx-runtime").JSX.Element;
8
27
  SRCaption: ({ caption }: {
9
28
  caption?: string | undefined;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("../../../../../node_modules/react/jsx-runtime.cjs");
4
+ const CellContainers_style = require("./CellContainers.style.cjs");
5
+ const EllipsisContainer = (props) => jsxRuntime.jsxRuntimeExports.jsx(CellContainers_style.FlexContainer, {
6
+ children: jsxRuntime.jsxRuntimeExports.jsx(CellContainers_style.EllipsisContainer, {
7
+ ...props,
8
+ ellipsis: true,
9
+ tooltipOnEllipsis: true
10
+ })
11
+ });
12
+ const containers = {
13
+ flex: CellContainers_style.FlexContainer,
14
+ ellipsis: EllipsisContainer
15
+ };
16
+ const getCellContainer = (containerOrType) => {
17
+ if (!containerOrType) return void 0;
18
+ if (typeof containerOrType === "string") return containers[containerOrType];
19
+ return containerOrType;
20
+ };
21
+ exports.getCellContainer = getCellContainer;
@@ -0,0 +1,2 @@
1
+ import type { CellContainerComponent, ColumnCellContainer } from '../../../../Table.types';
2
+ export declare const getCellContainer: (containerOrType: ColumnCellContainer | undefined) => CellContainerComponent | undefined;
@@ -0,0 +1,21 @@
1
+ import { j as jsxRuntimeExports } from "../../../../../node_modules/react/jsx-runtime.js";
2
+ import { FlexContainer, EllipsisContainer as EllipsisContainer$1 } from "./CellContainers.style.js";
3
+ const EllipsisContainer = (props) => jsxRuntimeExports.jsx(FlexContainer, {
4
+ children: jsxRuntimeExports.jsx(EllipsisContainer$1, {
5
+ ...props,
6
+ ellipsis: true,
7
+ tooltipOnEllipsis: true
8
+ })
9
+ });
10
+ const containers = {
11
+ flex: FlexContainer,
12
+ ellipsis: EllipsisContainer
13
+ };
14
+ const getCellContainer = (containerOrType) => {
15
+ if (!containerOrType) return void 0;
16
+ if (typeof containerOrType === "string") return containers[containerOrType];
17
+ return containerOrType;
18
+ };
19
+ export {
20
+ getCellContainer
21
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const _styled = require("styled-components");
4
+ const redisUiComponents = require("@redislabsdev/redis-ui-components");
5
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
6
+ const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
7
+ const FlexContainer = _styled__default.default(redisUiComponents.FlexGroup).withConfig({
8
+ displayName: "CellContainersstyle__FlexContainer",
9
+ componentId: "RedisUI__sc-1w37zg2-0"
10
+ })(["height:100%;width:100%;max-width:100%;overflow:hidden;svg{flex:none;}"]);
11
+ const EllipsisContainer = _styled__default.default(redisUiComponents.Typography.Base).withConfig({
12
+ displayName: "CellContainersstyle__EllipsisContainer",
13
+ componentId: "RedisUI__sc-1w37zg2-1"
14
+ })(["flex:0 1 auto;white-space:inherit;text-align:start;"]);
15
+ exports.EllipsisContainer = EllipsisContainer;
16
+ exports.FlexContainer = FlexContainer;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const FlexContainer: import("styled-components").StyledComponent<({ gap, direction, align, justify, wrap, ...restProps }: import("@redislabsdev/redis-ui-components").FlexGroupProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
3
+ export declare const EllipsisContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@redislabsdev/redis-ui-components").TypographyBaseProps & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -0,0 +1,14 @@
1
+ import _styled from "styled-components";
2
+ import { FlexGroup, Typography } from "@redislabsdev/redis-ui-components";
3
+ const FlexContainer = _styled(FlexGroup).withConfig({
4
+ displayName: "CellContainersstyle__FlexContainer",
5
+ componentId: "RedisUI__sc-1w37zg2-0"
6
+ })(["height:100%;width:100%;max-width:100%;overflow:hidden;svg{flex:none;}"]);
7
+ const EllipsisContainer = _styled(Typography.Base).withConfig({
8
+ displayName: "CellContainersstyle__EllipsisContainer",
9
+ componentId: "RedisUI__sc-1w37zg2-1"
10
+ })(["flex:0 1 auto;white-space:inherit;text-align:start;"]);
11
+ export {
12
+ EllipsisContainer,
13
+ FlexContainer
14
+ };
@@ -3,14 +3,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("../../../../../node_modules/react/jsx-runtime.cjs");
4
4
  const redisUiComponents = require("@redislabsdev/redis-ui-components");
5
5
  const table_utils = require("../../../../utils/table.utils.cjs");
6
+ const CellContainers = require("../CellContainers/CellContainers.cjs");
6
7
  const Table_style = require("../../../../Table.style.cjs");
7
8
  const TableBodyCellCompose = redisUiComponents.forwardRefWithGenerics(({
8
9
  cell,
9
10
  style,
11
+ children,
10
12
  ...restProps
11
13
  }, ref) => {
12
- var _a, _b;
13
- const columnCellProps = (_b = (_a = cell.column.columnDef).getCellProps) == null ? void 0 : _b.call(_a, cell.row.original, cell);
14
+ const {
15
+ getCellProps,
16
+ cellContainer
17
+ } = cell.column.columnDef;
18
+ const columnCellProps = getCellProps == null ? void 0 : getCellProps(cell.row.original, cell);
19
+ const CellContainer = CellContainers.getCellContainer(cellContainer);
14
20
  return jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableBodyCell, {
15
21
  ...restProps,
16
22
  ...columnCellProps,
@@ -19,7 +25,10 @@ const TableBodyCellCompose = redisUiComponents.forwardRefWithGenerics(({
19
25
  width: table_utils.getWidth(cell.column),
20
26
  ...style,
21
27
  ...columnCellProps == null ? void 0 : columnCellProps.style
22
- }
28
+ },
29
+ children: CellContainer ? jsxRuntime.jsxRuntimeExports.jsx(CellContainer, {
30
+ children
31
+ }) : children
23
32
  });
24
33
  });
25
34
  exports.TableBodyCellCompose = TableBodyCellCompose;
@@ -1,14 +1,20 @@
1
1
  import { j as jsxRuntimeExports } from "../../../../../node_modules/react/jsx-runtime.js";
2
2
  import { forwardRefWithGenerics } from "@redislabsdev/redis-ui-components";
3
3
  import { getWidth } from "../../../../utils/table.utils.js";
4
+ import { getCellContainer } from "../CellContainers/CellContainers.js";
4
5
  import { TableBodyCell } from "../../../../Table.style.js";
5
6
  const TableBodyCellCompose = forwardRefWithGenerics(({
6
7
  cell,
7
8
  style,
9
+ children,
8
10
  ...restProps
9
11
  }, ref) => {
10
- var _a, _b;
11
- const columnCellProps = (_b = (_a = cell.column.columnDef).getCellProps) == null ? void 0 : _b.call(_a, cell.row.original, cell);
12
+ const {
13
+ getCellProps,
14
+ cellContainer
15
+ } = cell.column.columnDef;
16
+ const columnCellProps = getCellProps == null ? void 0 : getCellProps(cell.row.original, cell);
17
+ const CellContainer = getCellContainer(cellContainer);
12
18
  return jsxRuntimeExports.jsx(TableBodyCell, {
13
19
  ...restProps,
14
20
  ...columnCellProps,
@@ -17,7 +23,10 @@ const TableBodyCellCompose = forwardRefWithGenerics(({
17
23
  width: getWidth(cell.column),
18
24
  ...style,
19
25
  ...columnCellProps == null ? void 0 : columnCellProps.style
20
- }
26
+ },
27
+ children: CellContainer ? jsxRuntimeExports.jsx(CellContainer, {
28
+ children
29
+ }) : children
21
30
  });
22
31
  });
23
32
  export {
@@ -2,11 +2,14 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("../../../node_modules/react/jsx-runtime.cjs");
4
4
  const React = require("react");
5
+ const Divider = require("../TableTopBar/components/Divider/Divider.cjs");
5
6
  const Table_style = require("../../Table.style.cjs");
6
- const TableBottomBar = (props) => (
7
+ const TableBottomBar = Object.assign((props) => (
7
8
  // eslint-disable-next-line react/destructuring-assignment
8
9
  React.Children.toArray(props.children).filter((ch) => ch !== "").length ? jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableBottomBar, {
9
10
  ...props
10
11
  }) : null
11
- );
12
+ ), {
13
+ Divider: Divider.TableBarDivider
14
+ });
12
15
  exports.TableBottomBar = TableBottomBar;
@@ -1,2 +1,4 @@
1
1
  import { ComposeElementProps } from '@redislabsdev/redis-ui-components';
2
- export declare const TableBottomBar: (props: ComposeElementProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const TableBottomBar: ((props: ComposeElementProps) => import("react/jsx-runtime").JSX.Element | null) & {
3
+ Divider: (props: Omit<import("@redislabsdev/redis-ui-components").FlexDividerProps, "orientation">) => import("react/jsx-runtime").JSX.Element;
4
+ };
@@ -1,12 +1,15 @@
1
1
  import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
2
2
  import { Children } from "react";
3
+ import { TableBarDivider } from "../TableTopBar/components/Divider/Divider.js";
3
4
  import { TableBottomBar as TableBottomBar$1 } from "../../Table.style.js";
4
- const TableBottomBar = (props) => (
5
+ const TableBottomBar = Object.assign((props) => (
5
6
  // eslint-disable-next-line react/destructuring-assignment
6
7
  Children.toArray(props.children).filter((ch) => ch !== "").length ? jsxRuntimeExports.jsx(TableBottomBar$1, {
7
8
  ...props
8
9
  }) : null
9
- );
10
+ ), {
11
+ Divider: TableBarDivider
12
+ });
10
13
  export {
11
14
  TableBottomBar
12
15
  };
@@ -2,11 +2,19 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("../../../node_modules/react/jsx-runtime.cjs");
4
4
  const React = require("react");
5
+ const TitleGroup = require("./components/TitleGroup/TitleGroup.cjs");
6
+ const Divider = require("./components/Divider/Divider.cjs");
7
+ const Title = require("./components/Title/Title.cjs");
5
8
  const Table_style = require("../../Table.style.cjs");
6
- const TableTopBar = (props) => (
9
+ const TableTopBar = Object.assign((props) => (
7
10
  // eslint-disable-next-line react/destructuring-assignment
8
11
  React.Children.toArray(props.children).filter((ch) => ch !== "").length ? jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableTopBar, {
9
12
  ...props
10
13
  }) : null
11
- );
14
+ ), {
15
+ Divider: Divider.TableBarDivider,
16
+ Title: Title.TableTitle,
17
+ TitleGroup: TitleGroup.TableTopBarTitleGroup,
18
+ SearchInput: Table_style.TableSearchInput
19
+ });
12
20
  exports.TableTopBar = TableTopBar;
@@ -1,2 +1,20 @@
1
+ /// <reference types="react" />
1
2
  import { ComposeElementProps } from '@redislabsdev/redis-ui-components';
2
- export declare const TableTopBar: (props: ComposeElementProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ export declare const TableTopBar: ((props: ComposeElementProps) => import("react/jsx-runtime").JSX.Element | null) & {
4
+ Divider: (props: Omit<import("@redislabsdev/redis-ui-components").FlexDividerProps, "orientation">) => import("react/jsx-runtime").JSX.Element;
5
+ Title: ({ text, ...restProps }: import("@redislabsdev/redis-ui-components").ChildFree<import("@redislabsdev/redis-ui-components").TypographyHeadingProps> & {
6
+ text: string;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ TitleGroup: ({ icon: Icon, title, infoTip, ...restProps }: import("./components/TitleGroup/TitleGroup.types").TableTopBarTitleGroupProps) => import("react/jsx-runtime").JSX.Element;
9
+ SearchInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@redislabsdev/redis-ui-components/dist/Inputs/components/Compose/TextCompose.types").TextInputComposeProps, "parser" | "formatter" | "readOnly"> & import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").InputTagProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/ResetButton/ResetButton.types").ResetButtonProps & import("@redislabsdev/redis-ui-components").RestInputProps & import("react").RefAttributes<HTMLInputElement>> & {
10
+ Compose: ({ value, defaultValue, onChange, parser, formatter, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Inputs/components/Compose/CommonCompose.types").CommonInputComposeProps & Omit<import("@redislabsdev/redis-ui-components/dist/Inputs/components/Context/InputValueProvider").InputValueProviderProps, "children"> & Omit<ComposeElementProps<HTMLElement>, "onChange" | "defaultValue"> & {
11
+ readonlyRender?: import("@redislabsdev/redis-ui-components/dist/Inputs/components/ReadonlyRender/ReadonlyRender.types").ReadOnlyRenderComponent | undefined;
12
+ readonlyProps?: import("react").HTMLAttributes<HTMLElement> | undefined;
13
+ }) => import("react/jsx-runtime").JSX.Element;
14
+ ResetButton: ({ size, icon, allowReset, onClick, onMouseDown, ...restProps }: Partial<import("@redislabsdev/redis-ui-components").IconButtonProps> & import("@redislabsdev/redis-ui-components/dist/Inputs/components/ResetButton/ResetButton.types").ResetButtonProps) => import("react/jsx-runtime").JSX.Element | null;
15
+ Tag: import("react").ForwardRefExoticComponent<import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").InputTagProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/InputTag/InputTag.types").RestInputTagProps & import("react").RefAttributes<HTMLInputElement>>;
16
+ StatusIndicator: ({ className, style, size, ...restProps }: import("@redislabsdev/redis-ui-icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "className" | "style">) => import("react/jsx-runtime").JSX.Element | null;
17
+ LoadingIndicator: ({ loading, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").LoadingIndicatorProps & import("@redislabsdev/redis-ui-components/dist/Inputs/components/LoadingIndicator/LoadingIndicator.types").RestLoadingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
18
+ SearchIcon: () => import("react/jsx-runtime").JSX.Element;
19
+ }, any, {}, never>;
20
+ };
@@ -1,12 +1,20 @@
1
1
  import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
2
2
  import { Children } from "react";
3
- import { TableTopBar as TableTopBar$1 } from "../../Table.style.js";
4
- const TableTopBar = (props) => (
3
+ import { TableTopBarTitleGroup } from "./components/TitleGroup/TitleGroup.js";
4
+ import { TableBarDivider } from "./components/Divider/Divider.js";
5
+ import { TableTitle } from "./components/Title/Title.js";
6
+ import { TableTopBar as TableTopBar$1, TableSearchInput } from "../../Table.style.js";
7
+ const TableTopBar = Object.assign((props) => (
5
8
  // eslint-disable-next-line react/destructuring-assignment
6
9
  Children.toArray(props.children).filter((ch) => ch !== "").length ? jsxRuntimeExports.jsx(TableTopBar$1, {
7
10
  ...props
8
11
  }) : null
9
- );
12
+ ), {
13
+ Divider: TableBarDivider,
14
+ Title: TableTitle,
15
+ TitleGroup: TableTopBarTitleGroup,
16
+ SearchInput: TableSearchInput
17
+ });
10
18
  export {
11
19
  TableTopBar
12
20
  };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("../../../../../node_modules/react/jsx-runtime.cjs");
4
+ const redisUiComponents = require("@redislabsdev/redis-ui-components");
5
+ const TableBarDivider = (props) => jsxRuntime.jsxRuntimeExports.jsx(redisUiComponents.FlexDivider, {
6
+ padding: "XL",
7
+ ...props
8
+ });
9
+ exports.TableBarDivider = TableBarDivider;
@@ -0,0 +1,2 @@
1
+ import { FlexDividerProps } from '@redislabsdev/redis-ui-components';
2
+ export declare const TableBarDivider: (props: Omit<FlexDividerProps, 'orientation'>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { j as jsxRuntimeExports } from "../../../../../node_modules/react/jsx-runtime.js";
2
+ import { FlexDivider } from "@redislabsdev/redis-ui-components";
3
+ const TableBarDivider = (props) => jsxRuntimeExports.jsx(FlexDivider, {
4
+ padding: "XL",
5
+ ...props
6
+ });
7
+ export {
8
+ TableBarDivider
9
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("../../../../../node_modules/react/jsx-runtime.cjs");
4
+ const redisUiComponents = require("@redislabsdev/redis-ui-components");
5
+ const TableTitle = ({
6
+ text,
7
+ ...restProps
8
+ }) => jsxRuntime.jsxRuntimeExports.jsx(redisUiComponents.Typography.Heading, {
9
+ size: "S",
10
+ ellipsis: true,
11
+ tooltipOnEllipsis: true,
12
+ ...restProps,
13
+ children: text
14
+ });
15
+ exports.TableTitle = TableTitle;
@@ -0,0 +1,4 @@
1
+ import { ChildFree, TypographyHeadingProps } from '@redislabsdev/redis-ui-components';
2
+ export declare const TableTitle: ({ text, ...restProps }: ChildFree<TypographyHeadingProps> & {
3
+ text: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { j as jsxRuntimeExports } from "../../../../../node_modules/react/jsx-runtime.js";
2
+ import { Typography } from "@redislabsdev/redis-ui-components";
3
+ const TableTitle = ({
4
+ text,
5
+ ...restProps
6
+ }) => jsxRuntimeExports.jsx(Typography.Heading, {
7
+ size: "S",
8
+ ellipsis: true,
9
+ tooltipOnEllipsis: true,
10
+ ...restProps,
11
+ children: text
12
+ });
13
+ export {
14
+ TableTitle
15
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("../../../../../node_modules/react/jsx-runtime.cjs");
4
+ const redisUiComponents = require("@redislabsdev/redis-ui-components");
5
+ const Title = require("../Title/Title.cjs");
6
+ const TableTopBarTitleGroup = ({
7
+ icon: Icon,
8
+ title,
9
+ infoTip,
10
+ ...restProps
11
+ }) => jsxRuntime.jsxRuntimeExports.jsxs(redisUiComponents.FlexGroup, {
12
+ gap: "XS",
13
+ ...restProps,
14
+ children: [Icon && jsxRuntime.jsxRuntimeExports.jsx(Icon, {}), jsxRuntime.jsxRuntimeExports.jsx(Title.TableTitle, {
15
+ text: title
16
+ }), infoTip && jsxRuntime.jsxRuntimeExports.jsx(redisUiComponents.MoreInfoIcon, {
17
+ tooltip: infoTip
18
+ })]
19
+ });
20
+ exports.TableTopBarTitleGroup = TableTopBarTitleGroup;
@@ -0,0 +1,2 @@
1
+ import { TableTopBarTitleGroupProps } from './TitleGroup.types';
2
+ export declare const TableTopBarTitleGroup: ({ icon: Icon, title, infoTip, ...restProps }: TableTopBarTitleGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { j as jsxRuntimeExports } from "../../../../../node_modules/react/jsx-runtime.js";
2
+ import { FlexGroup, MoreInfoIcon } from "@redislabsdev/redis-ui-components";
3
+ import { TableTitle } from "../Title/Title.js";
4
+ const TableTopBarTitleGroup = ({
5
+ icon: Icon,
6
+ title,
7
+ infoTip,
8
+ ...restProps
9
+ }) => jsxRuntimeExports.jsxs(FlexGroup, {
10
+ gap: "XS",
11
+ ...restProps,
12
+ children: [Icon && jsxRuntimeExports.jsx(Icon, {}), jsxRuntimeExports.jsx(TableTitle, {
13
+ text: title
14
+ }), infoTip && jsxRuntimeExports.jsx(MoreInfoIcon, {
15
+ tooltip: infoTip
16
+ })]
17
+ });
18
+ export {
19
+ TableTopBarTitleGroup
20
+ };
@@ -0,0 +1,10 @@
1
+ import { IconType } from '@redislabsdev/redis-ui-icons';
2
+ import { FlexGroupProps } from '@redislabsdev/redis-ui-components';
3
+ type OwnTableTopBarTitleGroupProps = {
4
+ icon?: IconType;
5
+ title: string;
6
+ infoTip?: string;
7
+ };
8
+ type RestTableTopBarTitleGroupProps = Omit<FlexGroupProps, 'direction' | 'children'>;
9
+ export type TableTopBarTitleGroupProps = OwnTableTopBarTitleGroupProps & RestTableTopBarTitleGroupProps;
10
+ export {};
@@ -1,7 +1,7 @@
1
1
  import '@tanstack/table-core';
2
2
  import { Cell, Header } from '@tanstack/react-table';
3
3
  import { HTMLAttributes } from 'react';
4
- import { ColumnSizeUnit } from './Table.types';
4
+ import { ColumnCellContainer, ColumnSizeUnit } from './Table.types';
5
5
  declare module '@tanstack/table-core' {
6
6
  interface StringHeaderIdentifier {
7
7
  isHeaderHidden?: boolean;
@@ -9,6 +9,7 @@ declare module '@tanstack/table-core' {
9
9
  sizeUnit?: ColumnSizeUnit;
10
10
  getHeaderCellProps?: VoidFunction;
11
11
  getCellProps?: VoidFunction;
12
+ cellContainer?: ColumnCellContainer;
12
13
  }
13
14
  interface IdIdentifier<TData, TValue> {
14
15
  isHeaderHidden?: boolean;
@@ -16,5 +17,6 @@ declare module '@tanstack/table-core' {
16
17
  sizeUnit?: ColumnSizeUnit;
17
18
  getHeaderCellProps?: (header: Header<TData, unknown>) => HTMLAttributes<HTMLTableCellElement> & Record<string, unknown>;
18
19
  getCellProps?: (data: TData, cell: Cell<TData, unknown>) => HTMLAttributes<HTMLTableCellElement> & Record<string, unknown>;
20
+ cellContainer?: ColumnCellContainer;
19
21
  }
20
22
  }
@@ -1,7 +1,7 @@
1
1
  import { TableOptions } from '@tanstack/table-core';
2
2
  import { ColumnDef, RowData } from '@tanstack/react-table';
3
3
  import { SetOptional } from 'type-fest';
4
- export type PartialTableOptions<T extends RowData> = Partial<Omit<TableOptions<T>, 'columns' | 'data' | 'getRowId' | 'onStateChange' | 'getCoreRowModel' | 'defaultColumn' | 'debugTable' | 'debugRows' | 'debugHeaders' | 'debugColumns' | 'debugCells' | 'debugAll' | 'autoResetAll' | 'meta'>>;
4
+ export type PartialTableOptions<T extends RowData> = Partial<Omit<TableOptions<T>, 'columns' | 'data' | 'getRowId' | 'onStateChange' | 'getCoreRowModel' | 'defaultColumn' | 'debugTable' | 'debugRows' | 'debugHeaders' | 'debugColumns' | 'debugCells' | 'debugAll' | 'autoResetAll'>>;
5
5
  export type UserTableOptions<T extends RowData> = Omit<SetOptional<TableOptions<T>, 'getCoreRowModel'>, 'data' | 'columns'>;
6
6
  export type TablePluginData<T extends RowData> = {
7
7
  /** Partial table options that will be smartly merged with other table options */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/table",
3
3
  "license": "UNLICENSED",
4
- "version": "3.3.2",
4
+ "version": "3.5.1",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "registry": "https://npm.pkg.github.com/"
@@ -29,11 +29,11 @@
29
29
  "react": "^17.0.0 || ^18.0.0",
30
30
  "react-dom": "^17.0.0 || ^18.0.0",
31
31
  "styled-components": "^5.0.0",
32
- "@redis-ui/styles": "^14.4.2"
32
+ "@redis-ui/styles": "^14.9.1"
33
33
  },
34
34
  "dependencies": {
35
- "@redis-ui/components": "^41.5.0",
36
- "@redis-ui/icons": "^6.6.0",
35
+ "@redis-ui/components": "^42.5.1",
36
+ "@redis-ui/icons": "^6.7.1",
37
37
  "@tanstack/react-table": "^8.9.8",
38
38
  "type-fest": "^3.13.1"
39
39
  },