@clickhouse/click-ui 0.0.125 → 0.0.126
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 +15 -16
- package/dist/click-ui.umd.js +15 -16
- package/dist/components/Accordion/Accordion.d.ts +4 -2
- package/package.json +1 -1
package/dist/click-ui.es.js
CHANGED
|
@@ -8731,6 +8731,7 @@ const Accordion = ({
|
|
|
8731
8731
|
color,
|
|
8732
8732
|
icon,
|
|
8733
8733
|
iconSize,
|
|
8734
|
+
gap,
|
|
8734
8735
|
children,
|
|
8735
8736
|
...delegated
|
|
8736
8737
|
}) => /* @__PURE__ */ jsxRuntimeExports.jsx($1bf158f521e1b1b4$export$be92b6f5f03c0fe9, { type: "single", collapsible: true, ...delegated, children: /* @__PURE__ */ jsxRuntimeExports.jsxs($1bf158f521e1b1b4$export$6d08773d2e66f8f2, { value: "item", children: [
|
|
@@ -8739,8 +8740,9 @@ const Accordion = ({
|
|
|
8739
8740
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionIconWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "chevron-right", size: iconSize || size2, "aria-label": "accordion icon" }) }),
|
|
8740
8741
|
icon ? /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: icon, size: iconSize || size2 }) : null
|
|
8741
8742
|
] }),
|
|
8742
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8743
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: size2, children: title })
|
|
8743
8744
|
] }),
|
|
8745
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer, { size: gap }),
|
|
8744
8746
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContent, { children })
|
|
8745
8747
|
] }) });
|
|
8746
8748
|
const AccordionTrigger = styled($1bf158f521e1b1b4$export$41fb9f06171c75f4).withConfig({
|
|
@@ -16934,7 +16936,7 @@ const useSelectionActions = ({
|
|
|
16934
16936
|
let action = null;
|
|
16935
16937
|
if (moveAnchor) {
|
|
16936
16938
|
if (selection.type === "rows") {
|
|
16937
|
-
const row = clamp2(selection.anchorRow + rowDiff, 0, rowCount - 1);
|
|
16939
|
+
const row = clamp2(selection.anchorRow + rowDiff, 0, rowCount + rowStart - 1);
|
|
16938
16940
|
action = {
|
|
16939
16941
|
type: "shiftRowSelection",
|
|
16940
16942
|
row,
|
|
@@ -16948,7 +16950,7 @@ const useSelectionActions = ({
|
|
|
16948
16950
|
event
|
|
16949
16951
|
};
|
|
16950
16952
|
} else if (selection.type === "rectangle") {
|
|
16951
|
-
const row = clamp2(selection.anchor.row + rowDiff, 0, rowCount - 1);
|
|
16953
|
+
const row = clamp2(selection.anchor.row + rowDiff, 0, rowCount + rowStart - 1);
|
|
16952
16954
|
const column = clamp2(selection.anchor.column + columnDiff, 0, columnCount - 1);
|
|
16953
16955
|
action = {
|
|
16954
16956
|
type: "shiftSelection",
|
|
@@ -16958,7 +16960,7 @@ const useSelectionActions = ({
|
|
|
16958
16960
|
};
|
|
16959
16961
|
}
|
|
16960
16962
|
} else {
|
|
16961
|
-
const row = clamp2(focus.row + rowDiff, 0, rowCount - 1);
|
|
16963
|
+
const row = clamp2(focus.row + rowDiff, 0, rowCount + rowStart - 1);
|
|
16962
16964
|
const column = clamp2(focus.column + columnDiff, 0, columnCount - 1);
|
|
16963
16965
|
action = {
|
|
16964
16966
|
type: "normal",
|
|
@@ -16971,7 +16973,7 @@ const useSelectionActions = ({
|
|
|
16971
16973
|
onSelection(action);
|
|
16972
16974
|
}
|
|
16973
16975
|
return action;
|
|
16974
|
-
}, [onSelection, columnCount, rowCount, selection, focus]);
|
|
16976
|
+
}, [onSelection, columnCount, rowCount, selection, focus, rowStart]);
|
|
16975
16977
|
const getSelectionType = useCallback((args) => {
|
|
16976
16978
|
if (args.type === "all") {
|
|
16977
16979
|
const isSelected = cellRectSelected(selection, 0, rowStart, columnCount - 1, rowCount + rowStart - 1);
|
|
@@ -37924,7 +37926,7 @@ const TableRow = styled.tr.withConfig({
|
|
|
37924
37926
|
`);
|
|
37925
37927
|
const TableData = styled.td.withConfig({
|
|
37926
37928
|
componentId: "sc-1q458rb-4"
|
|
37927
|
-
})(["overflow:hidden;", " @media (max-width:768px){width:auto;min-width:40%;
|
|
37929
|
+
})(["overflow:hidden;", " @media (max-width:768px){width:auto;min-width:40%;", "}"], ({
|
|
37928
37930
|
theme: theme2,
|
|
37929
37931
|
$size
|
|
37930
37932
|
}) => `
|
|
@@ -37933,9 +37935,9 @@ const TableData = styled.td.withConfig({
|
|
|
37933
37935
|
padding: ${theme2.click.table.body.cell.space[$size].y} ${theme2.click.table.body.cell.space[$size].x};
|
|
37934
37936
|
`, ({
|
|
37935
37937
|
theme: theme2
|
|
37936
|
-
}) =>
|
|
37937
|
-
|
|
37938
|
-
|
|
37938
|
+
}) => `
|
|
37939
|
+
padding: ${theme2.click.table.body.cell.space.sm.y} ${theme2.click.table.body.cell.space.sm.x};
|
|
37940
|
+
`);
|
|
37939
37941
|
const StyledColGroup = styled.colgroup.withConfig({
|
|
37940
37942
|
componentId: "sc-1q458rb-5"
|
|
37941
37943
|
})(["@media (max-width:768px){display:none;}"]);
|
|
@@ -38009,9 +38011,6 @@ const TableRowCloseButton = styled.button.withConfig({
|
|
|
38009
38011
|
}) => `
|
|
38010
38012
|
${$isDeleted ? "transform: rotate(45deg)" : ""};
|
|
38011
38013
|
`);
|
|
38012
|
-
const TableText = styled.div.withConfig({
|
|
38013
|
-
componentId: "sc-1q458rb-17"
|
|
38014
|
-
})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
38015
38014
|
const TableBodyRow = ({
|
|
38016
38015
|
headers,
|
|
38017
38016
|
items,
|
|
@@ -38036,7 +38035,7 @@ const TableBodyRow = ({
|
|
|
38036
38035
|
...cellProps
|
|
38037
38036
|
}, cellIndex) => /* @__PURE__ */ jsxRuntimeExports.jsxs(TableData, { $size: size2, ...cellProps, children: [
|
|
38038
38037
|
headers[cellIndex] && /* @__PURE__ */ jsxRuntimeExports.jsx(MobileHeader, { children: headers[cellIndex].label }),
|
|
38039
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38038
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(EllipsisContent, { component: "div", children: label })
|
|
38040
38039
|
] }, `table-cell-${cellIndex}`)),
|
|
38041
38040
|
actionsList.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsList, { $size: size2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ActionsContainer, { children: [
|
|
38042
38041
|
actionsList.includes("editAction") && /* @__PURE__ */ jsxRuntimeExports.jsx(EditButton, { as: IconButton$1, type: "ghost", disabled: isDisabled || isDeleted || !isEditable, icon: "pencil", onClick: onEdit, "data-testid": "table-row-edit" }),
|
|
@@ -38045,10 +38044,10 @@ const TableBodyRow = ({
|
|
|
38045
38044
|
] });
|
|
38046
38045
|
};
|
|
38047
38046
|
const SpanedTableData = styled(TableData).withConfig({
|
|
38048
|
-
componentId: "sc-1q458rb-
|
|
38047
|
+
componentId: "sc-1q458rb-17"
|
|
38049
38048
|
})(["text-align:center;"]);
|
|
38050
38049
|
const CustomTableDataMessage = styled.div.withConfig({
|
|
38051
|
-
componentId: "sc-1q458rb-
|
|
38050
|
+
componentId: "sc-1q458rb-18"
|
|
38052
38051
|
})(["display:flex;gap:0.5rem;justify-content:center;"]);
|
|
38053
38052
|
const LoadingData = () => {
|
|
38054
38053
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -38135,7 +38134,7 @@ const Table = forwardRef(({
|
|
|
38135
38134
|
] });
|
|
38136
38135
|
});
|
|
38137
38136
|
const StyledTable = styled.table.withConfig({
|
|
38138
|
-
componentId: "sc-1q458rb-
|
|
38137
|
+
componentId: "sc-1q458rb-19"
|
|
38139
38138
|
})(["width:100%;border-spacing:0;overflow:hidden;table-layout:fixed;", " @media (max-width:768px){border:none;table-layout:auto;}"], ({
|
|
38140
38139
|
theme: theme2
|
|
38141
38140
|
}) => `
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -8748,6 +8748,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8748
8748
|
color,
|
|
8749
8749
|
icon,
|
|
8750
8750
|
iconSize,
|
|
8751
|
+
gap,
|
|
8751
8752
|
children,
|
|
8752
8753
|
...delegated
|
|
8753
8754
|
}) => /* @__PURE__ */ jsxRuntimeExports.jsx($1bf158f521e1b1b4$export$be92b6f5f03c0fe9, { type: "single", collapsible: true, ...delegated, children: /* @__PURE__ */ jsxRuntimeExports.jsxs($1bf158f521e1b1b4$export$6d08773d2e66f8f2, { value: "item", children: [
|
|
@@ -8756,8 +8757,9 @@ var __publicField = (obj, key, value) => {
|
|
|
8756
8757
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionIconWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: "chevron-right", size: iconSize || size2, "aria-label": "accordion icon" }) }),
|
|
8757
8758
|
icon ? /* @__PURE__ */ jsxRuntimeExports.jsx(SvgImage, { name: icon, size: iconSize || size2 }) : null
|
|
8758
8759
|
] }),
|
|
8759
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8760
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Text, { size: size2, children: title })
|
|
8760
8761
|
] }),
|
|
8762
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer, { size: gap }),
|
|
8761
8763
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContent, { children })
|
|
8762
8764
|
] }) });
|
|
8763
8765
|
const AccordionTrigger = styled($1bf158f521e1b1b4$export$41fb9f06171c75f4).withConfig({
|
|
@@ -16951,7 +16953,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16951
16953
|
let action = null;
|
|
16952
16954
|
if (moveAnchor) {
|
|
16953
16955
|
if (selection.type === "rows") {
|
|
16954
|
-
const row = clamp2(selection.anchorRow + rowDiff, 0, rowCount - 1);
|
|
16956
|
+
const row = clamp2(selection.anchorRow + rowDiff, 0, rowCount + rowStart - 1);
|
|
16955
16957
|
action = {
|
|
16956
16958
|
type: "shiftRowSelection",
|
|
16957
16959
|
row,
|
|
@@ -16965,7 +16967,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16965
16967
|
event
|
|
16966
16968
|
};
|
|
16967
16969
|
} else if (selection.type === "rectangle") {
|
|
16968
|
-
const row = clamp2(selection.anchor.row + rowDiff, 0, rowCount - 1);
|
|
16970
|
+
const row = clamp2(selection.anchor.row + rowDiff, 0, rowCount + rowStart - 1);
|
|
16969
16971
|
const column = clamp2(selection.anchor.column + columnDiff, 0, columnCount - 1);
|
|
16970
16972
|
action = {
|
|
16971
16973
|
type: "shiftSelection",
|
|
@@ -16975,7 +16977,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16975
16977
|
};
|
|
16976
16978
|
}
|
|
16977
16979
|
} else {
|
|
16978
|
-
const row = clamp2(focus.row + rowDiff, 0, rowCount - 1);
|
|
16980
|
+
const row = clamp2(focus.row + rowDiff, 0, rowCount + rowStart - 1);
|
|
16979
16981
|
const column = clamp2(focus.column + columnDiff, 0, columnCount - 1);
|
|
16980
16982
|
action = {
|
|
16981
16983
|
type: "normal",
|
|
@@ -16988,7 +16990,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16988
16990
|
onSelection(action);
|
|
16989
16991
|
}
|
|
16990
16992
|
return action;
|
|
16991
|
-
}, [onSelection, columnCount, rowCount, selection, focus]);
|
|
16993
|
+
}, [onSelection, columnCount, rowCount, selection, focus, rowStart]);
|
|
16992
16994
|
const getSelectionType = React.useCallback((args) => {
|
|
16993
16995
|
if (args.type === "all") {
|
|
16994
16996
|
const isSelected = cellRectSelected(selection, 0, rowStart, columnCount - 1, rowCount + rowStart - 1);
|
|
@@ -37941,7 +37943,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
37941
37943
|
`);
|
|
37942
37944
|
const TableData = styled.td.withConfig({
|
|
37943
37945
|
componentId: "sc-1q458rb-4"
|
|
37944
|
-
})(["overflow:hidden;", " @media (max-width:768px){width:auto;min-width:40%;
|
|
37946
|
+
})(["overflow:hidden;", " @media (max-width:768px){width:auto;min-width:40%;", "}"], ({
|
|
37945
37947
|
theme: theme2,
|
|
37946
37948
|
$size
|
|
37947
37949
|
}) => `
|
|
@@ -37950,9 +37952,9 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
37950
37952
|
padding: ${theme2.click.table.body.cell.space[$size].y} ${theme2.click.table.body.cell.space[$size].x};
|
|
37951
37953
|
`, ({
|
|
37952
37954
|
theme: theme2
|
|
37953
|
-
}) =>
|
|
37954
|
-
|
|
37955
|
-
|
|
37955
|
+
}) => `
|
|
37956
|
+
padding: ${theme2.click.table.body.cell.space.sm.y} ${theme2.click.table.body.cell.space.sm.x};
|
|
37957
|
+
`);
|
|
37956
37958
|
const StyledColGroup = styled.colgroup.withConfig({
|
|
37957
37959
|
componentId: "sc-1q458rb-5"
|
|
37958
37960
|
})(["@media (max-width:768px){display:none;}"]);
|
|
@@ -38026,9 +38028,6 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
38026
38028
|
}) => `
|
|
38027
38029
|
${$isDeleted ? "transform: rotate(45deg)" : ""};
|
|
38028
38030
|
`);
|
|
38029
|
-
const TableText = styled.div.withConfig({
|
|
38030
|
-
componentId: "sc-1q458rb-17"
|
|
38031
|
-
})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
38032
38031
|
const TableBodyRow = ({
|
|
38033
38032
|
headers,
|
|
38034
38033
|
items,
|
|
@@ -38053,7 +38052,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
38053
38052
|
...cellProps
|
|
38054
38053
|
}, cellIndex) => /* @__PURE__ */ jsxRuntimeExports.jsxs(TableData, { $size: size2, ...cellProps, children: [
|
|
38055
38054
|
headers[cellIndex] && /* @__PURE__ */ jsxRuntimeExports.jsx(MobileHeader, { children: headers[cellIndex].label }),
|
|
38056
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38055
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(EllipsisContent, { component: "div", children: label })
|
|
38057
38056
|
] }, `table-cell-${cellIndex}`)),
|
|
38058
38057
|
actionsList.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsList, { $size: size2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ActionsContainer, { children: [
|
|
38059
38058
|
actionsList.includes("editAction") && /* @__PURE__ */ jsxRuntimeExports.jsx(EditButton, { as: IconButton$1, type: "ghost", disabled: isDisabled || isDeleted || !isEditable, icon: "pencil", onClick: onEdit, "data-testid": "table-row-edit" }),
|
|
@@ -38062,10 +38061,10 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
38062
38061
|
] });
|
|
38063
38062
|
};
|
|
38064
38063
|
const SpanedTableData = styled(TableData).withConfig({
|
|
38065
|
-
componentId: "sc-1q458rb-
|
|
38064
|
+
componentId: "sc-1q458rb-17"
|
|
38066
38065
|
})(["text-align:center;"]);
|
|
38067
38066
|
const CustomTableDataMessage = styled.div.withConfig({
|
|
38068
|
-
componentId: "sc-1q458rb-
|
|
38067
|
+
componentId: "sc-1q458rb-18"
|
|
38069
38068
|
})(["display:flex;gap:0.5rem;justify-content:center;"]);
|
|
38070
38069
|
const LoadingData = () => {
|
|
38071
38070
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -38152,7 +38151,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
38152
38151
|
] });
|
|
38153
38152
|
});
|
|
38154
38153
|
const StyledTable = styled.table.withConfig({
|
|
38155
|
-
componentId: "sc-1q458rb-
|
|
38154
|
+
componentId: "sc-1q458rb-19"
|
|
38156
38155
|
})(["width:100%;border-spacing:0;overflow:hidden;table-layout:fixed;", " @media (max-width:768px){border:none;table-layout:auto;}"], ({
|
|
38157
38156
|
theme: theme2
|
|
38158
38157
|
}) => `
|
|
@@ -3,17 +3,19 @@ import * as RadixAccordion from "@radix-ui/react-accordion";
|
|
|
3
3
|
import { IconSize } from '../../components/Icon/types';
|
|
4
4
|
import { IconName } from '../../components';
|
|
5
5
|
type Size = "sm" | "md" | "lg";
|
|
6
|
+
type Gap = "sm" | "md" | "lg";
|
|
6
7
|
type Color = "default" | "link";
|
|
7
8
|
export interface AccordionProps extends SizeProp, Omit<RadixAccordion.AccordionSingleProps, "type" | "collapsible"> {
|
|
8
9
|
title: string;
|
|
9
10
|
color?: Color;
|
|
10
11
|
icon?: IconName;
|
|
11
12
|
iconSize?: IconSize;
|
|
13
|
+
gap?: Gap;
|
|
12
14
|
children: React.ReactNode;
|
|
13
15
|
}
|
|
14
16
|
interface SizeProp {
|
|
15
17
|
size?: Size;
|
|
16
18
|
}
|
|
17
|
-
declare const SidebarAccordion: import("styled-components").StyledComponent<({ title, size, color, icon, iconSize, children, ...delegated }: AccordionProps) => import("react/jsx-runtime").JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
-
declare const AccordionToExport: import("styled-components").StyledComponent<({ title, size, color, icon, iconSize, children, ...delegated }: AccordionProps) => import("react/jsx-runtime").JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
+
declare const SidebarAccordion: import("styled-components").StyledComponent<({ title, size, color, icon, iconSize, gap, children, ...delegated }: AccordionProps) => import("react/jsx-runtime").JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
+
declare const AccordionToExport: import("styled-components").StyledComponent<({ title, size, color, icon, iconSize, gap, children, ...delegated }: AccordionProps) => import("react/jsx-runtime").JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
19
21
|
export { AccordionToExport as Accordion, SidebarAccordion };
|