@clickhouse/click-ui 0.0.158 → 0.0.160
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/click-ui.es.js
CHANGED
|
@@ -9117,6 +9117,11 @@ const TextWrapper = styled.div.withConfig({
|
|
|
9117
9117
|
}) => `
|
|
9118
9118
|
gap: ${theme2.click.alert[$size].space.gap};
|
|
9119
9119
|
padding: ${theme2.click.alert[$size].space.y} ${theme2.click.alert[$size].space.x};
|
|
9120
|
+
a {
|
|
9121
|
+
font: inherit;
|
|
9122
|
+
color: inherit;
|
|
9123
|
+
text-decoration: underline;
|
|
9124
|
+
}
|
|
9120
9125
|
`);
|
|
9121
9126
|
const Title$4 = styled.h6.withConfig({
|
|
9122
9127
|
componentId: "sc-1wvczk0-4"
|
|
@@ -14907,13 +14912,13 @@ const FlyoutContent = styled($5d3850c4d0b4e6c7$export$b6d9565de1e068cf).withConf
|
|
|
14907
14912
|
${$strategy === "relative" ? `
|
|
14908
14913
|
position: absolute !important;` : ""}
|
|
14909
14914
|
overflow: hidden;
|
|
14910
|
-
transform: translateX(calc(100% - 50px));
|
|
14915
|
+
transform: ${$align === "start" ? "translateX(calc(50px - 100%))" : "translateX(calc(100% - 50px))"};
|
|
14911
14916
|
transition: 0.3s ease-in-out;
|
|
14912
14917
|
&:hover,
|
|
14913
14918
|
&.active,
|
|
14914
14919
|
&:focus-within {
|
|
14915
14920
|
transform: translateX(0);
|
|
14916
|
-
left: auto;
|
|
14921
|
+
${$align === "start" ? "right" : "left"}: auto;
|
|
14917
14922
|
}
|
|
14918
14923
|
}
|
|
14919
14924
|
`);
|
|
@@ -32754,6 +32759,7 @@ const Pagination = ({
|
|
|
32754
32759
|
onPageNumberFocus,
|
|
32755
32760
|
onPageNumberBlur,
|
|
32756
32761
|
disableNextButton,
|
|
32762
|
+
allowAllRows = true,
|
|
32757
32763
|
...props
|
|
32758
32764
|
}) => {
|
|
32759
32765
|
const hasRowCount = ["number", "string"].includes(typeof rowCount);
|
|
@@ -32806,6 +32812,9 @@ const Pagination = ({
|
|
|
32806
32812
|
onNextPageClick(e);
|
|
32807
32813
|
}
|
|
32808
32814
|
}, [currentPage, onChangeProp, onNextPageClick, rightButtonDisabled]);
|
|
32815
|
+
if (pageSize === -1 && !allowAllRows && maxRowsPerPageList.length > 0) {
|
|
32816
|
+
pageSize = maxRowsPerPageList[0];
|
|
32817
|
+
}
|
|
32809
32818
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container, { gap, justifyContent: justifyContent ?? (rowCount || maxRowsPerPageList.length > 0 ? "space-between" : "center"), fillWidth, ...props, children: [
|
|
32810
32819
|
hasRowCount && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { component: "div", color: "muted", size: "sm", children: [
|
|
32811
32820
|
typeof rowCount === "number" ? formatNumber(rowCount) : rowCount,
|
|
@@ -32821,7 +32830,7 @@ const Pagination = ({
|
|
|
32821
32830
|
/* @__PURE__ */ jsxRuntimeExports.jsx(IconButton$1, { icon: "chevron-right", type: "ghost", disabled: rightButtonDisabled, onClick: onNextClick, "data-testid": "next-btn" })
|
|
32822
32831
|
] }),
|
|
32823
32832
|
maxRowsPerPageList.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(CustomSelect, { as: Select, onSelect: onPageSizeChange, value: pageSize.toString(), children: [
|
|
32824
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Select.Item, { value: "-1", children: "All rows" }),
|
|
32833
|
+
allowAllRows && /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Item, { value: "-1", children: "All rows" }),
|
|
32825
32834
|
maxRowsPerPageList.map((option2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Select.Item, { value: option2.toString(), children: [
|
|
32826
32835
|
option2,
|
|
32827
32836
|
" rows"
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -9134,6 +9134,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9134
9134
|
}) => `
|
|
9135
9135
|
gap: ${theme2.click.alert[$size].space.gap};
|
|
9136
9136
|
padding: ${theme2.click.alert[$size].space.y} ${theme2.click.alert[$size].space.x};
|
|
9137
|
+
a {
|
|
9138
|
+
font: inherit;
|
|
9139
|
+
color: inherit;
|
|
9140
|
+
text-decoration: underline;
|
|
9141
|
+
}
|
|
9137
9142
|
`);
|
|
9138
9143
|
const Title$4 = styled.h6.withConfig({
|
|
9139
9144
|
componentId: "sc-1wvczk0-4"
|
|
@@ -14924,13 +14929,13 @@ var __publicField = (obj, key, value) => {
|
|
|
14924
14929
|
${$strategy === "relative" ? `
|
|
14925
14930
|
position: absolute !important;` : ""}
|
|
14926
14931
|
overflow: hidden;
|
|
14927
|
-
transform: translateX(calc(100% - 50px));
|
|
14932
|
+
transform: ${$align === "start" ? "translateX(calc(50px - 100%))" : "translateX(calc(100% - 50px))"};
|
|
14928
14933
|
transition: 0.3s ease-in-out;
|
|
14929
14934
|
&:hover,
|
|
14930
14935
|
&.active,
|
|
14931
14936
|
&:focus-within {
|
|
14932
14937
|
transform: translateX(0);
|
|
14933
|
-
left: auto;
|
|
14938
|
+
${$align === "start" ? "right" : "left"}: auto;
|
|
14934
14939
|
}
|
|
14935
14940
|
}
|
|
14936
14941
|
`);
|
|
@@ -32771,6 +32776,7 @@ var __publicField = (obj, key, value) => {
|
|
|
32771
32776
|
onPageNumberFocus,
|
|
32772
32777
|
onPageNumberBlur,
|
|
32773
32778
|
disableNextButton,
|
|
32779
|
+
allowAllRows = true,
|
|
32774
32780
|
...props
|
|
32775
32781
|
}) => {
|
|
32776
32782
|
const hasRowCount = ["number", "string"].includes(typeof rowCount);
|
|
@@ -32823,6 +32829,9 @@ var __publicField = (obj, key, value) => {
|
|
|
32823
32829
|
onNextPageClick(e);
|
|
32824
32830
|
}
|
|
32825
32831
|
}, [currentPage, onChangeProp, onNextPageClick, rightButtonDisabled]);
|
|
32832
|
+
if (pageSize === -1 && !allowAllRows && maxRowsPerPageList.length > 0) {
|
|
32833
|
+
pageSize = maxRowsPerPageList[0];
|
|
32834
|
+
}
|
|
32826
32835
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container, { gap, justifyContent: justifyContent ?? (rowCount || maxRowsPerPageList.length > 0 ? "space-between" : "center"), fillWidth, ...props, children: [
|
|
32827
32836
|
hasRowCount && /* @__PURE__ */ jsxRuntimeExports.jsxs(Text, { component: "div", color: "muted", size: "sm", children: [
|
|
32828
32837
|
typeof rowCount === "number" ? formatNumber(rowCount) : rowCount,
|
|
@@ -32838,7 +32847,7 @@ var __publicField = (obj, key, value) => {
|
|
|
32838
32847
|
/* @__PURE__ */ jsxRuntimeExports.jsx(IconButton$1, { icon: "chevron-right", type: "ghost", disabled: rightButtonDisabled, onClick: onNextClick, "data-testid": "next-btn" })
|
|
32839
32848
|
] }),
|
|
32840
32849
|
maxRowsPerPageList.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(CustomSelect, { as: Select, onSelect: onPageSizeChange, value: pageSize.toString(), children: [
|
|
32841
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Select.Item, { value: "-1", children: "All rows" }),
|
|
32850
|
+
allowAllRows && /* @__PURE__ */ jsxRuntimeExports.jsx(Select.Item, { value: "-1", children: "All rows" }),
|
|
32842
32851
|
maxRowsPerPageList.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Select.Item, { value: option.toString(), children: [
|
|
32843
32852
|
option,
|
|
32844
32853
|
" rows"
|
|
@@ -14,5 +14,6 @@ export interface PaginationProps extends Omit<ContainerProps<"div">, "children"
|
|
|
14
14
|
onPageNumberFocus?: FocusEventHandler<HTMLInputElement>;
|
|
15
15
|
onPageNumberBlur?: FocusEventHandler<HTMLInputElement>;
|
|
16
16
|
disableNextButton?: boolean;
|
|
17
|
+
allowAllRows?: boolean;
|
|
17
18
|
}
|
|
18
|
-
export declare const Pagination: ({ totalPages, currentPage, maxRowsPerPageList, rowCount, onChange: onChangeProp, onPageSizeChange: onPageSizeChangeProp, pageSize, fillWidth, gap, justifyContent, onNextPageClick, onPrevPageClick, onPageNumberFocus, onPageNumberBlur, disableNextButton, ...props }: PaginationProps) => ReactElement;
|
|
19
|
+
export declare const Pagination: ({ totalPages, currentPage, maxRowsPerPageList, rowCount, onChange: onChangeProp, onPageSizeChange: onPageSizeChangeProp, pageSize, fillWidth, gap, justifyContent, onNextPageClick, onPrevPageClick, onPageNumberFocus, onPageNumberBlur, disableNextButton, allowAllRows, ...props }: PaginationProps) => ReactElement;
|