@redis-ui/table 2.4.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Table/Table.cjs +58 -34
- package/dist/Table/Table.d.ts +3 -1
- package/dist/Table/Table.js +60 -36
- package/dist/Table/Table.style.cjs +24 -13
- package/dist/Table/Table.style.d.ts +4 -1
- package/dist/Table/Table.style.js +25 -14
- package/dist/Table/Table.types.d.ts +25 -8
- package/dist/Table/components/EmptyStateRow/EmptyStateRow.cjs +16 -0
- package/dist/Table/components/EmptyStateRow/EmptyStateRow.d.ts +8 -0
- package/dist/Table/components/EmptyStateRow/EmptyStateRow.js +16 -0
- package/dist/Table/components/ExpandRowButton/ExpandRowButton.cjs +1 -0
- package/dist/Table/components/ExpandRowButton/ExpandRowButton.js +1 -0
- package/dist/Table/components/RowSelection/HeaderMultiRowSelectionButton.cjs +29 -0
- package/dist/Table/components/RowSelection/HeaderMultiRowSelectionButton.d.ts +7 -0
- package/dist/Table/components/RowSelection/HeaderMultiRowSelectionButton.js +29 -0
- package/dist/Table/components/RowSelection/HeaderMultiRowSelectionButton.test.d.ts +1 -0
- package/dist/Table/components/RowSelection/RowSelectionButton.cjs +15 -0
- package/dist/Table/components/RowSelection/RowSelectionButton.d.ts +6 -0
- package/dist/Table/components/RowSelection/RowSelectionButton.js +15 -0
- package/dist/Table/components/RowSelection/RowSelectionButton.test.d.ts +1 -0
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.style.cjs +1 -1
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.style.js +1 -1
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.style.cjs +2 -2
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.style.js +2 -2
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.cjs +37 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.d.ts +4 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.js +37 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.types.d.ts +13 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.utils.cjs +101 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.utils.d.ts +11 -0
- package/dist/Table/components/TableHeaderCell/TableHeaderCell.utils.js +101 -0
- package/dist/Table/components/TablePagination/TablePagination.cjs +27 -8
- package/dist/Table/components/TablePagination/TablePagination.js +26 -7
- package/dist/Table/components/TablePagination/TablePagination.style.cjs +14 -9
- package/dist/Table/components/TablePagination/TablePagination.style.d.ts +8 -7
- package/dist/Table/components/TablePagination/TablePagination.style.js +14 -9
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +32 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +55 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +37 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +100 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +82 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +24 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +51 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +33 -0
- package/package.json +5 -4
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
|
|
2
2
|
import { DoubleChevronLeftIcon, ChevronLeftIcon, ChevronRightIcon, DoubleChevronRightIcon } from "@redislabsdev/redis-ui-icons";
|
|
3
|
+
import { useId } from "../../../node_modules/@radix-ui/react-id/dist/index.js";
|
|
3
4
|
import { useTableContext } from "../../Table.context.js";
|
|
4
|
-
import { PaginationRow, CountInfo, ItemPerPageText, Select, PaginationActions, PaginationIconButton, PaginationIndexText, PageLabelText, TotalPagesText } from "./TablePagination.style.js";
|
|
5
|
+
import { PaginationRow, CountInfo, ItemPerPageText, Label, Select, PaginationActions, PaginationIconButton, PaginationIndexText, PageLabelText, TotalPagesText } from "./TablePagination.style.js";
|
|
5
6
|
const DEFAULT_PAGE_SIZES = [10, 25, 50, 100];
|
|
6
7
|
const TablePagination = ({
|
|
7
8
|
pageSizes = DEFAULT_PAGE_SIZES
|
|
@@ -9,6 +10,8 @@ const TablePagination = ({
|
|
|
9
10
|
const {
|
|
10
11
|
table
|
|
11
12
|
} = useTableContext();
|
|
13
|
+
const perPageId = useId();
|
|
14
|
+
const pageNumId = useId();
|
|
12
15
|
if (!table._getPaginationRowModel) {
|
|
13
16
|
return null;
|
|
14
17
|
}
|
|
@@ -36,8 +39,12 @@ const TablePagination = ({
|
|
|
36
39
|
gap: "1rem"
|
|
37
40
|
},
|
|
38
41
|
children: [jsxRuntimeExports.jsx(ItemPerPageText, {
|
|
39
|
-
children:
|
|
42
|
+
children: jsxRuntimeExports.jsx(Label, {
|
|
43
|
+
htmlFor: perPageId,
|
|
44
|
+
children: "Items per page:"
|
|
45
|
+
})
|
|
40
46
|
}), jsxRuntimeExports.jsx(Select, {
|
|
47
|
+
id: perPageId,
|
|
41
48
|
value: pageSize.toString(),
|
|
42
49
|
onChange: handlePageSizeChange,
|
|
43
50
|
disabled: pageSizes[0] > totalRowCount,
|
|
@@ -50,12 +57,16 @@ const TablePagination = ({
|
|
|
50
57
|
icon: DoubleChevronLeftIcon,
|
|
51
58
|
size: "S",
|
|
52
59
|
onClick: () => handlePageIndexChange(0),
|
|
53
|
-
disabled: pageIndex === 0
|
|
60
|
+
disabled: pageIndex === 0,
|
|
61
|
+
title: "First page",
|
|
62
|
+
"aria-label": "first page"
|
|
54
63
|
}), jsxRuntimeExports.jsx(PaginationIconButton, {
|
|
55
64
|
icon: ChevronLeftIcon,
|
|
56
65
|
size: "S",
|
|
57
66
|
onClick: () => handlePageIndexChange(pageIndex - 1),
|
|
58
|
-
disabled: pageIndex === 0
|
|
67
|
+
disabled: pageIndex === 0,
|
|
68
|
+
title: "Previous page",
|
|
69
|
+
"aria-label": "previous page"
|
|
59
70
|
}), jsxRuntimeExports.jsxs(PaginationIndexText, {
|
|
60
71
|
size: "S",
|
|
61
72
|
children: [pageIndex + 1, " of ", pageCount]
|
|
@@ -63,17 +74,25 @@ const TablePagination = ({
|
|
|
63
74
|
icon: ChevronRightIcon,
|
|
64
75
|
size: "S",
|
|
65
76
|
onClick: () => handlePageIndexChange(pageIndex + 1),
|
|
66
|
-
disabled: pageIndex === pageCount - 1
|
|
77
|
+
disabled: pageIndex === pageCount - 1,
|
|
78
|
+
title: "Next page",
|
|
79
|
+
"aria-label": "next page"
|
|
67
80
|
}), jsxRuntimeExports.jsx(PaginationIconButton, {
|
|
68
81
|
icon: DoubleChevronRightIcon,
|
|
69
82
|
size: "S",
|
|
70
83
|
onClick: () => handlePageIndexChange(pageCount - 1),
|
|
71
|
-
disabled: pageIndex === pageCount - 1
|
|
84
|
+
disabled: pageIndex === pageCount - 1,
|
|
85
|
+
title: "Last page",
|
|
86
|
+
"aria-label": "last page"
|
|
72
87
|
})]
|
|
73
88
|
}), jsxRuntimeExports.jsxs(PaginationActions, {
|
|
74
89
|
children: [jsxRuntimeExports.jsx(PageLabelText, {
|
|
75
|
-
children:
|
|
90
|
+
children: jsxRuntimeExports.jsx(Label, {
|
|
91
|
+
htmlFor: pageNumId,
|
|
92
|
+
children: "Page"
|
|
93
|
+
})
|
|
76
94
|
}), jsxRuntimeExports.jsx(Select, {
|
|
95
|
+
id: pageNumId,
|
|
77
96
|
value: (pageIndex + 1).toString(),
|
|
78
97
|
onChange: (value) => handlePageIndexChange(Number(value) - 1),
|
|
79
98
|
options: Array.from({
|
|
@@ -7,50 +7,55 @@ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
|
7
7
|
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
8
8
|
const PaginationIconButton = _styled__default.default(redisUiComponents.IconButton).withConfig({
|
|
9
9
|
displayName: "TablePaginationstyle__PaginationIconButton",
|
|
10
|
-
componentId: "
|
|
10
|
+
componentId: "RedisUI__sc-ccqfi0-0"
|
|
11
11
|
})(["color:", ";&:disabled{color:", ";}"], () => redisUiStyles.useTheme().components.table.components.tablePagination.paginationIconButton.enabledColor, () => redisUiStyles.useTheme().components.table.components.tablePagination.paginationIconButton.disabledColor);
|
|
12
12
|
const CountInfo = _styled__default.default(redisUiComponents.Typography.Body).withConfig({
|
|
13
13
|
displayName: "TablePaginationstyle__CountInfo",
|
|
14
|
-
componentId: "
|
|
14
|
+
componentId: "RedisUI__sc-ccqfi0-1"
|
|
15
15
|
})(["display:flex;margin-right:auto;font-size:1.2rem;color:", ";"], () => redisUiStyles.useTheme().components.table.components.tablePagination.countInfoText.color);
|
|
16
16
|
const PaginationRow = _styled__default.default.div.withConfig({
|
|
17
17
|
displayName: "TablePaginationstyle__PaginationRow",
|
|
18
|
-
componentId: "
|
|
18
|
+
componentId: "RedisUI__sc-ccqfi0-2"
|
|
19
19
|
})(["display:flex;align-items:center;gap:3.2rem;width:100%;height:4.8rem;padding:0 1.2rem;justify-content:flex-end;border-top:1px solid ", ";"], () => redisUiStyles.useTheme().components.table.components.tablePagination.paginationRow.borderTop);
|
|
20
20
|
const Select = _styled__default.default(redisUiComponents.Select).withConfig({
|
|
21
21
|
displayName: "TablePaginationstyle__Select",
|
|
22
|
-
componentId: "
|
|
22
|
+
componentId: "RedisUI__sc-ccqfi0-3"
|
|
23
23
|
})(["height:2rem;padding:0 0.4rem;gap:0.4rem;span{font-size:1.2rem;line-height:initial;}"]);
|
|
24
24
|
const PaginationActions = _styled__default.default.div.withConfig({
|
|
25
25
|
displayName: "TablePaginationstyle__PaginationActions",
|
|
26
|
-
componentId: "
|
|
26
|
+
componentId: "RedisUI__sc-ccqfi0-4"
|
|
27
27
|
})(["display:flex;align-items:center;gap:0.4rem;"]);
|
|
28
28
|
const ItemPerPageText = _styled__default.default(redisUiComponents.Typography.Body).attrs({
|
|
29
29
|
size: "S"
|
|
30
30
|
}).withConfig({
|
|
31
31
|
displayName: "TablePaginationstyle__ItemPerPageText",
|
|
32
|
-
componentId: "
|
|
32
|
+
componentId: "RedisUI__sc-ccqfi0-5"
|
|
33
33
|
})(["color:", ";flex-shrink:0;"], () => redisUiStyles.useTheme().components.table.components.tablePagination.itemPerPageText.color);
|
|
34
34
|
const PaginationIndexText = _styled__default.default(redisUiComponents.Typography.Body).attrs({
|
|
35
35
|
size: "S"
|
|
36
36
|
}).withConfig({
|
|
37
37
|
displayName: "TablePaginationstyle__PaginationIndexText",
|
|
38
|
-
componentId: "
|
|
38
|
+
componentId: "RedisUI__sc-ccqfi0-6"
|
|
39
39
|
})(["color:", ";"], () => redisUiStyles.useTheme().components.table.components.tablePagination.paginationIndexText.color);
|
|
40
40
|
const PageLabelText = _styled__default.default(redisUiComponents.Typography.Body).attrs({
|
|
41
41
|
size: "S"
|
|
42
42
|
}).withConfig({
|
|
43
43
|
displayName: "TablePaginationstyle__PageLabelText",
|
|
44
|
-
componentId: "
|
|
44
|
+
componentId: "RedisUI__sc-ccqfi0-7"
|
|
45
45
|
})(["color:", ";flex-shrink:0;"], () => redisUiStyles.useTheme().components.table.components.tablePagination.pageLabelText.color);
|
|
46
|
+
const Label = _styled__default.default.label.withConfig({
|
|
47
|
+
displayName: "TablePaginationstyle__Label",
|
|
48
|
+
componentId: "RedisUI__sc-ccqfi0-8"
|
|
49
|
+
})(["all:unset;"]);
|
|
46
50
|
const TotalPagesText = _styled__default.default(redisUiComponents.Typography.Body).attrs({
|
|
47
51
|
size: "S"
|
|
48
52
|
}).withConfig({
|
|
49
53
|
displayName: "TablePaginationstyle__TotalPagesText",
|
|
50
|
-
componentId: "
|
|
54
|
+
componentId: "RedisUI__sc-ccqfi0-9"
|
|
51
55
|
})(["color:", ";flex-shrink:0;"], () => redisUiStyles.useTheme().components.table.components.tablePagination.totalPagesText.color);
|
|
52
56
|
exports.CountInfo = CountInfo;
|
|
53
57
|
exports.ItemPerPageText = ItemPerPageText;
|
|
58
|
+
exports.Label = Label;
|
|
54
59
|
exports.PageLabelText = PageLabelText;
|
|
55
60
|
exports.PaginationActions = PaginationActions;
|
|
56
61
|
exports.PaginationIconButton = PaginationIconButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const PaginationIconButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@redislabsdev/redis-ui-components").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
3
|
-
export declare const CountInfo: import("styled-components").StyledComponent<({ size, variant, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
3
|
+
export declare const CountInfo: import("styled-components").StyledComponent<({ size, variant, color, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
4
4
|
export declare const PaginationRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export declare const Select: import("styled-components").StyledComponent<(<TValue extends string = string, TOption extends import("@redislabsdev/redis-ui-components").SelectOption<TValue> = import("@redislabsdev/redis-ui-components").SelectOption<TValue>>({ options, disabled, defaultOpen, open, onOpenChange, defaultValue, value, onChange, customCompare, error, valid, valueRender, searchable, placement, maxVisibleItems, placeholder, virtualized, contentWidth, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Select/components/Compose/Compose.types").SelectComposeProps<TValue, TOption> & Omit<import("@redislabsdev/redis-ui-components/dist/Select/components/Trigger/components/Compose/Compose.types").SelectTriggerComposeProps, "customContainer"> & import("@redislabsdev/redis-ui-components/dist/Select/components/Trigger/components/Value/Value.types").SelectTriggerValueProps<TOption> & {
|
|
6
6
|
allowReset?: boolean | undefined;
|
|
@@ -14,10 +14,10 @@ export declare const Select: import("styled-components").StyledComponent<(<TValu
|
|
|
14
14
|
Compose: ({ customContainer, id, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Select/components/Trigger/components/Compose/Compose.types").SelectTriggerComposeProps & import("@redislabsdev/redis-ui-components/dist/Select/components/Trigger/components/Compose/Compose.types").RestSelectTriggerComposeProps & import("@redislabsdev/redis-ui-components/dist/Helpers/common.types").ComposeChildrenProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
Value: <TOption_3 extends import("@redislabsdev/redis-ui-components").SelectOption<string> = import("@redislabsdev/redis-ui-components").SelectOption<string>>({ placeholder, valueRender, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Select/components/Trigger/components/Value/Value.types").SelectTriggerValueProps<TOption_3> & import("@redislabsdev/redis-ui-components/dist/Select/components/Trigger/components/Value/Value.types").RestSelectTriggerValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
ResetButton: ({ children, title, ...restProps }: import("react").HTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
-
StatusIndicator: (
|
|
17
|
+
StatusIndicator: ({ className, style, size, ...restProps }: import("@redislabsdev/redis-ui-icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "style" | "className">) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
18
|
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;
|
|
19
19
|
Arrow: ({ icon, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Select/components/Trigger/components/Arrow/Arrow.types").TriggerArrowProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
ErrorIcon: (
|
|
20
|
+
ErrorIcon: ({ className, style, size, ...restProps }: import("@redislabsdev/redis-ui-icons/monochrome").MonochromeIconProps & Pick<import("react").HTMLAttributes<unknown>, "style" | "className">) => import("react/jsx-runtime").JSX.Element | null;
|
|
21
21
|
};
|
|
22
22
|
Content: (<TOption_4 extends import("@redislabsdev/redis-ui-components").SelectOption<string> = import("@redislabsdev/redis-ui-components").SelectOption<string>>({ searchable, optionValueRender, optionComponent, maxVisibleItems, virtualized, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Select/components/Content/components/Compose/Compose.types").SelectContentComposeProps & import("@redislabsdev/redis-ui-components/dist/Select/components/Content/components/OptionList/OptionList.types").OptionListProps<TOption_4> & {
|
|
23
23
|
searchable?: boolean | undefined;
|
|
@@ -36,15 +36,16 @@ export declare const Select: import("styled-components").StyledComponent<(<TValu
|
|
|
36
36
|
};
|
|
37
37
|
}, any, {}, never>;
|
|
38
38
|
export declare const PaginationActions: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
39
|
-
export declare const ItemPerPageText: import("styled-components").StyledComponent<({ size, variant, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {
|
|
39
|
+
export declare const ItemPerPageText: import("styled-components").StyledComponent<({ size, variant, color, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {
|
|
40
40
|
size: "S";
|
|
41
41
|
}, "size">;
|
|
42
|
-
export declare const PaginationIndexText: import("styled-components").StyledComponent<({ size, variant, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {
|
|
42
|
+
export declare const PaginationIndexText: import("styled-components").StyledComponent<({ size, variant, color, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {
|
|
43
43
|
size: "S";
|
|
44
44
|
}, "size">;
|
|
45
|
-
export declare const PageLabelText: import("styled-components").StyledComponent<({ size, variant, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {
|
|
45
|
+
export declare const PageLabelText: import("styled-components").StyledComponent<({ size, variant, color, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {
|
|
46
46
|
size: "S";
|
|
47
47
|
}, "size">;
|
|
48
|
-
export declare const
|
|
48
|
+
export declare const Label: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
49
|
+
export declare const TotalPagesText: import("styled-components").StyledComponent<({ size, variant, color, component, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Body/Body.types").BodyProps) => import("react/jsx-runtime").JSX.Element, any, {
|
|
49
50
|
size: "S";
|
|
50
51
|
}, "size">;
|
|
@@ -3,51 +3,56 @@ import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
|
3
3
|
import { IconButton, Typography, Select as Select$1 } from "@redislabsdev/redis-ui-components";
|
|
4
4
|
const PaginationIconButton = _styled(IconButton).withConfig({
|
|
5
5
|
displayName: "TablePaginationstyle__PaginationIconButton",
|
|
6
|
-
componentId: "
|
|
6
|
+
componentId: "RedisUI__sc-ccqfi0-0"
|
|
7
7
|
})(["color:", ";&:disabled{color:", ";}"], () => useTheme().components.table.components.tablePagination.paginationIconButton.enabledColor, () => useTheme().components.table.components.tablePagination.paginationIconButton.disabledColor);
|
|
8
8
|
const CountInfo = _styled(Typography.Body).withConfig({
|
|
9
9
|
displayName: "TablePaginationstyle__CountInfo",
|
|
10
|
-
componentId: "
|
|
10
|
+
componentId: "RedisUI__sc-ccqfi0-1"
|
|
11
11
|
})(["display:flex;margin-right:auto;font-size:1.2rem;color:", ";"], () => useTheme().components.table.components.tablePagination.countInfoText.color);
|
|
12
12
|
const PaginationRow = _styled.div.withConfig({
|
|
13
13
|
displayName: "TablePaginationstyle__PaginationRow",
|
|
14
|
-
componentId: "
|
|
14
|
+
componentId: "RedisUI__sc-ccqfi0-2"
|
|
15
15
|
})(["display:flex;align-items:center;gap:3.2rem;width:100%;height:4.8rem;padding:0 1.2rem;justify-content:flex-end;border-top:1px solid ", ";"], () => useTheme().components.table.components.tablePagination.paginationRow.borderTop);
|
|
16
16
|
const Select = _styled(Select$1).withConfig({
|
|
17
17
|
displayName: "TablePaginationstyle__Select",
|
|
18
|
-
componentId: "
|
|
18
|
+
componentId: "RedisUI__sc-ccqfi0-3"
|
|
19
19
|
})(["height:2rem;padding:0 0.4rem;gap:0.4rem;span{font-size:1.2rem;line-height:initial;}"]);
|
|
20
20
|
const PaginationActions = _styled.div.withConfig({
|
|
21
21
|
displayName: "TablePaginationstyle__PaginationActions",
|
|
22
|
-
componentId: "
|
|
22
|
+
componentId: "RedisUI__sc-ccqfi0-4"
|
|
23
23
|
})(["display:flex;align-items:center;gap:0.4rem;"]);
|
|
24
24
|
const ItemPerPageText = _styled(Typography.Body).attrs({
|
|
25
25
|
size: "S"
|
|
26
26
|
}).withConfig({
|
|
27
27
|
displayName: "TablePaginationstyle__ItemPerPageText",
|
|
28
|
-
componentId: "
|
|
28
|
+
componentId: "RedisUI__sc-ccqfi0-5"
|
|
29
29
|
})(["color:", ";flex-shrink:0;"], () => useTheme().components.table.components.tablePagination.itemPerPageText.color);
|
|
30
30
|
const PaginationIndexText = _styled(Typography.Body).attrs({
|
|
31
31
|
size: "S"
|
|
32
32
|
}).withConfig({
|
|
33
33
|
displayName: "TablePaginationstyle__PaginationIndexText",
|
|
34
|
-
componentId: "
|
|
34
|
+
componentId: "RedisUI__sc-ccqfi0-6"
|
|
35
35
|
})(["color:", ";"], () => useTheme().components.table.components.tablePagination.paginationIndexText.color);
|
|
36
36
|
const PageLabelText = _styled(Typography.Body).attrs({
|
|
37
37
|
size: "S"
|
|
38
38
|
}).withConfig({
|
|
39
39
|
displayName: "TablePaginationstyle__PageLabelText",
|
|
40
|
-
componentId: "
|
|
40
|
+
componentId: "RedisUI__sc-ccqfi0-7"
|
|
41
41
|
})(["color:", ";flex-shrink:0;"], () => useTheme().components.table.components.tablePagination.pageLabelText.color);
|
|
42
|
+
const Label = _styled.label.withConfig({
|
|
43
|
+
displayName: "TablePaginationstyle__Label",
|
|
44
|
+
componentId: "RedisUI__sc-ccqfi0-8"
|
|
45
|
+
})(["all:unset;"]);
|
|
42
46
|
const TotalPagesText = _styled(Typography.Body).attrs({
|
|
43
47
|
size: "S"
|
|
44
48
|
}).withConfig({
|
|
45
49
|
displayName: "TablePaginationstyle__TotalPagesText",
|
|
46
|
-
componentId: "
|
|
50
|
+
componentId: "RedisUI__sc-ccqfi0-9"
|
|
47
51
|
})(["color:", ";flex-shrink:0;"], () => useTheme().components.table.components.tablePagination.totalPagesText.color);
|
|
48
52
|
export {
|
|
49
53
|
CountInfo,
|
|
50
54
|
ItemPerPageText,
|
|
55
|
+
Label,
|
|
51
56
|
PageLabelText,
|
|
52
57
|
PaginationActions,
|
|
53
58
|
PaginationIconButton,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const index = require("../../react-use-layout-effect/dist/index.cjs");
|
|
5
|
+
function _interopNamespace(e) {
|
|
6
|
+
if (e && e.__esModule) return e;
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
23
|
+
var useReactId = React__namespace["useId".toString()] || (() => void 0);
|
|
24
|
+
var count = 0;
|
|
25
|
+
function useId(deterministicId) {
|
|
26
|
+
const [id, setId] = React__namespace.useState(useReactId());
|
|
27
|
+
index.useLayoutEffect(() => {
|
|
28
|
+
setId((reactId) => reactId ?? String(count++));
|
|
29
|
+
}, [deterministicId]);
|
|
30
|
+
return id ? `radix-${id}` : "";
|
|
31
|
+
}
|
|
32
|
+
exports.useId = useId;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useLayoutEffect as useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
|
|
3
|
+
var useReactId = React["useId".toString()] || (() => void 0);
|
|
4
|
+
var count = 0;
|
|
5
|
+
function useId(deterministicId) {
|
|
6
|
+
const [id, setId] = React.useState(useReactId());
|
|
7
|
+
useLayoutEffect2(() => {
|
|
8
|
+
setId((reactId) => reactId ?? String(count++));
|
|
9
|
+
}, [deterministicId]);
|
|
10
|
+
return id ? `radix-${id}` : "";
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
useId
|
|
14
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
require("react-dom");
|
|
5
|
+
const index = require("../../react-slot/dist/index.cjs");
|
|
6
|
+
const jsxRuntime = require("../../../react/jsx-runtime.cjs");
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
|
+
if (e) {
|
|
11
|
+
for (const k in e) {
|
|
12
|
+
if (k !== "default") {
|
|
13
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: () => e[k]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
25
|
+
var NODES = [
|
|
26
|
+
"a",
|
|
27
|
+
"button",
|
|
28
|
+
"div",
|
|
29
|
+
"form",
|
|
30
|
+
"h2",
|
|
31
|
+
"h3",
|
|
32
|
+
"img",
|
|
33
|
+
"input",
|
|
34
|
+
"label",
|
|
35
|
+
"li",
|
|
36
|
+
"nav",
|
|
37
|
+
"ol",
|
|
38
|
+
"p",
|
|
39
|
+
"span",
|
|
40
|
+
"svg",
|
|
41
|
+
"ul"
|
|
42
|
+
];
|
|
43
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
44
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
45
|
+
const { asChild, ...primitiveProps } = props;
|
|
46
|
+
const Comp = asChild ? index.Slot : node;
|
|
47
|
+
if (typeof window !== "undefined") {
|
|
48
|
+
window[Symbol.for("radix-ui")] = true;
|
|
49
|
+
}
|
|
50
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
51
|
+
});
|
|
52
|
+
Node.displayName = `Primitive.${node}`;
|
|
53
|
+
return { ...primitive, [node]: Node };
|
|
54
|
+
}, {});
|
|
55
|
+
exports.Primitive = Primitive;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { Slot } from "../../react-slot/dist/index.js";
|
|
4
|
+
import { j as jsxRuntimeExports } from "../../../react/jsx-runtime.js";
|
|
5
|
+
var NODES = [
|
|
6
|
+
"a",
|
|
7
|
+
"button",
|
|
8
|
+
"div",
|
|
9
|
+
"form",
|
|
10
|
+
"h2",
|
|
11
|
+
"h3",
|
|
12
|
+
"img",
|
|
13
|
+
"input",
|
|
14
|
+
"label",
|
|
15
|
+
"li",
|
|
16
|
+
"nav",
|
|
17
|
+
"ol",
|
|
18
|
+
"p",
|
|
19
|
+
"span",
|
|
20
|
+
"svg",
|
|
21
|
+
"ul"
|
|
22
|
+
];
|
|
23
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
24
|
+
const Node = React.forwardRef((props, forwardedRef) => {
|
|
25
|
+
const { asChild, ...primitiveProps } = props;
|
|
26
|
+
const Comp = asChild ? Slot : node;
|
|
27
|
+
if (typeof window !== "undefined") {
|
|
28
|
+
window[Symbol.for("radix-ui")] = true;
|
|
29
|
+
}
|
|
30
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
31
|
+
});
|
|
32
|
+
Node.displayName = `Primitive.${node}`;
|
|
33
|
+
return { ...primitive, [node]: Node };
|
|
34
|
+
}, {});
|
|
35
|
+
export {
|
|
36
|
+
Primitive
|
|
37
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const index = require("../../react-compose-refs/dist/index.cjs");
|
|
5
|
+
const jsxRuntime = require("../../../react/jsx-runtime.cjs");
|
|
6
|
+
function _interopNamespace(e) {
|
|
7
|
+
if (e && e.__esModule) return e;
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
24
|
+
var Slot = React__namespace.forwardRef((props, forwardedRef) => {
|
|
25
|
+
const { children, ...slotProps } = props;
|
|
26
|
+
const childrenArray = React__namespace.Children.toArray(children);
|
|
27
|
+
const slottable = childrenArray.find(isSlottable);
|
|
28
|
+
if (slottable) {
|
|
29
|
+
const newElement = slottable.props.children;
|
|
30
|
+
const newChildren = childrenArray.map((child) => {
|
|
31
|
+
if (child === slottable) {
|
|
32
|
+
if (React__namespace.Children.count(newElement) > 1) return React__namespace.Children.only(null);
|
|
33
|
+
return React__namespace.isValidElement(newElement) ? newElement.props.children : null;
|
|
34
|
+
} else {
|
|
35
|
+
return child;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React__namespace.isValidElement(newElement) ? React__namespace.cloneElement(newElement, void 0, newChildren) : null });
|
|
39
|
+
}
|
|
40
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
41
|
+
});
|
|
42
|
+
Slot.displayName = "Slot";
|
|
43
|
+
var SlotClone = React__namespace.forwardRef((props, forwardedRef) => {
|
|
44
|
+
const { children, ...slotProps } = props;
|
|
45
|
+
if (React__namespace.isValidElement(children)) {
|
|
46
|
+
const childrenRef = getElementRef(children);
|
|
47
|
+
return React__namespace.cloneElement(children, {
|
|
48
|
+
...mergeProps(slotProps, children.props),
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
ref: forwardedRef ? index.composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
|
|
54
|
+
});
|
|
55
|
+
SlotClone.displayName = "SlotClone";
|
|
56
|
+
var Slottable = ({ children }) => {
|
|
57
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children });
|
|
58
|
+
};
|
|
59
|
+
function isSlottable(child) {
|
|
60
|
+
return React__namespace.isValidElement(child) && child.type === Slottable;
|
|
61
|
+
}
|
|
62
|
+
function mergeProps(slotProps, childProps) {
|
|
63
|
+
const overrideProps = { ...childProps };
|
|
64
|
+
for (const propName in childProps) {
|
|
65
|
+
const slotPropValue = slotProps[propName];
|
|
66
|
+
const childPropValue = childProps[propName];
|
|
67
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
68
|
+
if (isHandler) {
|
|
69
|
+
if (slotPropValue && childPropValue) {
|
|
70
|
+
overrideProps[propName] = (...args) => {
|
|
71
|
+
childPropValue(...args);
|
|
72
|
+
slotPropValue(...args);
|
|
73
|
+
};
|
|
74
|
+
} else if (slotPropValue) {
|
|
75
|
+
overrideProps[propName] = slotPropValue;
|
|
76
|
+
}
|
|
77
|
+
} else if (propName === "style") {
|
|
78
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
79
|
+
} else if (propName === "className") {
|
|
80
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return { ...slotProps, ...overrideProps };
|
|
84
|
+
}
|
|
85
|
+
function getElementRef(element) {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
88
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
89
|
+
if (mayWarn) {
|
|
90
|
+
return element.ref;
|
|
91
|
+
}
|
|
92
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
93
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
94
|
+
if (mayWarn) {
|
|
95
|
+
return element.props.ref;
|
|
96
|
+
}
|
|
97
|
+
return element.props.ref || element.ref;
|
|
98
|
+
}
|
|
99
|
+
exports.Slot = Slot;
|
|
100
|
+
exports.Slottable = Slottable;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { composeRefs } from "../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { j as jsxRuntimeExports } from "../../../react/jsx-runtime.js";
|
|
4
|
+
var Slot = React.forwardRef((props, forwardedRef) => {
|
|
5
|
+
const { children, ...slotProps } = props;
|
|
6
|
+
const childrenArray = React.Children.toArray(children);
|
|
7
|
+
const slottable = childrenArray.find(isSlottable);
|
|
8
|
+
if (slottable) {
|
|
9
|
+
const newElement = slottable.props.children;
|
|
10
|
+
const newChildren = childrenArray.map((child) => {
|
|
11
|
+
if (child === slottable) {
|
|
12
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
13
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
14
|
+
} else {
|
|
15
|
+
return child;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
19
|
+
}
|
|
20
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
21
|
+
});
|
|
22
|
+
Slot.displayName = "Slot";
|
|
23
|
+
var SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
24
|
+
const { children, ...slotProps } = props;
|
|
25
|
+
if (React.isValidElement(children)) {
|
|
26
|
+
const childrenRef = getElementRef(children);
|
|
27
|
+
return React.cloneElement(children, {
|
|
28
|
+
...mergeProps(slotProps, children.props),
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
34
|
+
});
|
|
35
|
+
SlotClone.displayName = "SlotClone";
|
|
36
|
+
var Slottable = ({ children }) => {
|
|
37
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children });
|
|
38
|
+
};
|
|
39
|
+
function isSlottable(child) {
|
|
40
|
+
return React.isValidElement(child) && child.type === Slottable;
|
|
41
|
+
}
|
|
42
|
+
function mergeProps(slotProps, childProps) {
|
|
43
|
+
const overrideProps = { ...childProps };
|
|
44
|
+
for (const propName in childProps) {
|
|
45
|
+
const slotPropValue = slotProps[propName];
|
|
46
|
+
const childPropValue = childProps[propName];
|
|
47
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
48
|
+
if (isHandler) {
|
|
49
|
+
if (slotPropValue && childPropValue) {
|
|
50
|
+
overrideProps[propName] = (...args) => {
|
|
51
|
+
childPropValue(...args);
|
|
52
|
+
slotPropValue(...args);
|
|
53
|
+
};
|
|
54
|
+
} else if (slotPropValue) {
|
|
55
|
+
overrideProps[propName] = slotPropValue;
|
|
56
|
+
}
|
|
57
|
+
} else if (propName === "style") {
|
|
58
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
59
|
+
} else if (propName === "className") {
|
|
60
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return { ...slotProps, ...overrideProps };
|
|
64
|
+
}
|
|
65
|
+
function getElementRef(element) {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
68
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
69
|
+
if (mayWarn) {
|
|
70
|
+
return element.ref;
|
|
71
|
+
}
|
|
72
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
73
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
74
|
+
if (mayWarn) {
|
|
75
|
+
return element.props.ref;
|
|
76
|
+
}
|
|
77
|
+
return element.props.ref || element.ref;
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
Slot,
|
|
81
|
+
Slottable
|
|
82
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
function _interopNamespace(e) {
|
|
5
|
+
if (e && e.__esModule) return e;
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
22
|
+
var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? React__namespace.useLayoutEffect : () => {
|
|
23
|
+
};
|
|
24
|
+
exports.useLayoutEffect = useLayoutEffect2;
|