@clickhouse/click-ui 0.0.147 → 0.0.149

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.
@@ -14844,9 +14844,9 @@ const FlyoutContent = styled($5d3850c4d0b4e6c7$export$b6d9565de1e068cf).withConf
14844
14844
  height: ${$strategy === "relative" ? "100%" : "auto"};
14845
14845
  padding: 0 ${theme2.click.flyout.space[$type].x}
14846
14846
  gap: ${theme2.click.flyout.space[$type].gap};
14847
+ box-shadow: ${$align === "start" ? theme2.click.flyout.shadow.reverse : theme2.click.flyout.shadow.default};
14847
14848
  border-${$align === "start" ? "right" : "left"}: 1px solid ${theme2.click.flyout.color.stroke.default};
14848
14849
  background: ${theme2.click.flyout.color.background.default};
14849
- box-shadow: ${theme2.click.flyout.shadow.default}};
14850
14850
 
14851
14851
  @media (max-width: 1024px) {
14852
14852
  ${$strategy === "relative" ? `
@@ -16987,7 +16987,7 @@ const Column = ({
16987
16987
  const isSelected = selectionType === "selectDirect";
16988
16988
  const isSelectedLeft = (leftSelectionType === "selectDirect" || isSelected) && leftSelectionType !== selectionType;
16989
16989
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(HeaderCellContainer, { $width: columnWidth(columnIndex), $columnPosition: columnPosition, $height: height, "data-header": columnIndex, children: [
16990
- /* @__PURE__ */ jsxRuntimeExports.jsx(StyledCell, { $type: "header", as: cell, columnIndex, type: "header-cell", $isFirstColumn: isFirstColumn, $selectionType: selectionType, $isLastColumn: isLastColumn, $isFocused: false, $isSelectedLeft: isSelectedLeft, $isSelectedTop: isSelected, $isLastRow: false, $isFirstRow: true, $height: height, "data-grid-row": -1, "data-grid-column": columnIndex, "data-selected": isSelected, $showBorder: showBorder }),
16990
+ /* @__PURE__ */ jsxRuntimeExports.jsx(StyledCell, { $type: "header", as: cell, columnIndex, type: "header-cell", $isFirstColumn: isFirstColumn, $selectionType: selectionType, $isLastColumn: isLastColumn, $isFocused: false, $isSelectedLeft: isSelectedLeft, $isSelectedTop: isSelected, $isLastRow: false, $isFirstRow: true, $height: height, "data-grid-row": -1, "data-grid-column": columnIndex, "data-selected": isSelected, $showBorder: showBorder, width: columnWidth(columnIndex) }),
16991
16991
  /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnResizer, { height, onColumnResize, columnIndex, setResizeCursorPosition })
16992
16992
  ] });
16993
16993
  };
@@ -31359,6 +31359,7 @@ const addCellToRow = (row, cell, rowIndex, columnIndex) => {
31359
31359
  const html = renderToStaticMarkup(createElement$1(cell, {
31360
31360
  rowIndex,
31361
31361
  columnIndex,
31362
+ width: 1e3,
31362
31363
  type: "row-cell"
31363
31364
  }));
31364
31365
  td.innerHTML = html;
@@ -32072,11 +32073,15 @@ const Grid = forwardRef(({
32072
32073
  lastRowStart.current = rowStart;
32073
32074
  }
32074
32075
  }, [rowStart, onItemsRendered]);
32076
+ const CellWithWidth = (args) => {
32077
+ const width = columnWidth(args.columnIndex);
32078
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Cell, { ...args, width });
32079
+ };
32075
32080
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { modal: false, onOpenChange: setContextMenuOpen, children: [
32076
32081
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { as: ContextMenu.Trigger, ref: mergeRefs([forwardedRef, containerRef]), tabIndex: 0, onMouseDown, onMouseMove, onKeyDown, onPointerDown, onPointerUp, onPointerLeave: setPointerCapture, onPointerEnter: setPointerCapture, onContextMenu, $rounded: rounded, $height: autoHeight ? rowCount * rowHeight + (showHeader ? headerHeight : 0) + elementBorderRef.current.scrollBarHeight : void 0, $showBorder: showBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AutoSizer, { onResize, children: ({
32077
32082
  height,
32078
32083
  width
32079
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(VariableSizeGrid, { ref: forwardedGridRef ? mergeRefs([forwardedGridRef, gridRef]) : gridRef, height, width, columnCount, rowHeight: () => rowHeight, useIsScrolling, innerElementType: InnerElementType, itemData: data, initialScrollTop: focus.row < rowStart ? focus.row * rowHeight : (focus.row - rowStart) * rowHeight, initialScrollLeft: getColumnHorizontalPosition(focus.column), columnWidth, rowCount, onScroll, outerRef, outerElementType: OuterElementType, onItemsRendered, ...props, children: Cell }) }) }),
32084
+ }) => /* @__PURE__ */ jsxRuntimeExports.jsx(VariableSizeGrid, { ref: forwardedGridRef ? mergeRefs([forwardedGridRef, gridRef]) : gridRef, height, width, columnCount, rowHeight: () => rowHeight, useIsScrolling, innerElementType: InnerElementType, itemData: data, initialScrollTop: focus.row < rowStart ? focus.row * rowHeight : (focus.row - rowStart) * rowHeight, initialScrollLeft: getColumnHorizontalPosition(focus.column), columnWidth, rowCount, onScroll, outerRef, outerElementType: OuterElementType, onItemsRendered, ...props, children: CellWithWidth }) }) }),
32080
32085
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenu.Content, { children: menuOptions.map((option2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenu.Item, { onSelect: option2.onSelect, children: option2.label }, `grid-${index2}`)) })
32081
32086
  ] });
32082
32087
  });
@@ -47283,7 +47288,8 @@ const click = {
47283
47288
  }
47284
47289
  },
47285
47290
  shadow: {
47286
- "default": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)"
47291
+ "default": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)",
47292
+ reverse: "5px 0 20px 0 rgba(0, 0, 0, 0.08), 6px 0 10px 0 rgba(0, 0, 0, 0.08)"
47287
47293
  },
47288
47294
  size: {
47289
47295
  "default": {
@@ -47926,7 +47932,8 @@ const spaces = {
47926
47932
  const shadow = {
47927
47933
  "1": "0 4px 6px -1px lch(6.77 0 0 / 0.15), 0 2px 4px -1px lch(6.77 0 0 / 0.15)",
47928
47934
  "2": "0 4px 4px 0 rgba(88, 92, 98, 0.06), inset 5px 0 10px 0 rgba(104, 105, 111, 0.1)",
47929
- "3": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)"
47935
+ "3": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)",
47936
+ "4": "5px 0 20px 0 rgba(0, 0, 0, 0.08), 6px 0 10px 0 rgba(0, 0, 0, 0.08)"
47930
47937
  };
47931
47938
  const breakpoint = {
47932
47939
  sizes: {
@@ -14861,9 +14861,9 @@ var __publicField = (obj, key, value) => {
14861
14861
  height: ${$strategy === "relative" ? "100%" : "auto"};
14862
14862
  padding: 0 ${theme2.click.flyout.space[$type].x}
14863
14863
  gap: ${theme2.click.flyout.space[$type].gap};
14864
+ box-shadow: ${$align === "start" ? theme2.click.flyout.shadow.reverse : theme2.click.flyout.shadow.default};
14864
14865
  border-${$align === "start" ? "right" : "left"}: 1px solid ${theme2.click.flyout.color.stroke.default};
14865
14866
  background: ${theme2.click.flyout.color.background.default};
14866
- box-shadow: ${theme2.click.flyout.shadow.default}};
14867
14867
 
14868
14868
  @media (max-width: 1024px) {
14869
14869
  ${$strategy === "relative" ? `
@@ -17004,7 +17004,7 @@ var __publicField = (obj, key, value) => {
17004
17004
  const isSelected = selectionType === "selectDirect";
17005
17005
  const isSelectedLeft = (leftSelectionType === "selectDirect" || isSelected) && leftSelectionType !== selectionType;
17006
17006
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(HeaderCellContainer, { $width: columnWidth(columnIndex), $columnPosition: columnPosition, $height: height, "data-header": columnIndex, children: [
17007
- /* @__PURE__ */ jsxRuntimeExports.jsx(StyledCell, { $type: "header", as: cell, columnIndex, type: "header-cell", $isFirstColumn: isFirstColumn, $selectionType: selectionType, $isLastColumn: isLastColumn, $isFocused: false, $isSelectedLeft: isSelectedLeft, $isSelectedTop: isSelected, $isLastRow: false, $isFirstRow: true, $height: height, "data-grid-row": -1, "data-grid-column": columnIndex, "data-selected": isSelected, $showBorder: showBorder }),
17007
+ /* @__PURE__ */ jsxRuntimeExports.jsx(StyledCell, { $type: "header", as: cell, columnIndex, type: "header-cell", $isFirstColumn: isFirstColumn, $selectionType: selectionType, $isLastColumn: isLastColumn, $isFocused: false, $isSelectedLeft: isSelectedLeft, $isSelectedTop: isSelected, $isLastRow: false, $isFirstRow: true, $height: height, "data-grid-row": -1, "data-grid-column": columnIndex, "data-selected": isSelected, $showBorder: showBorder, width: columnWidth(columnIndex) }),
17008
17008
  /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnResizer, { height, onColumnResize, columnIndex, setResizeCursorPosition })
17009
17009
  ] });
17010
17010
  };
@@ -31376,6 +31376,7 @@ var __publicField = (obj, key, value) => {
31376
31376
  const html = renderToStaticMarkup(React.createElement(cell, {
31377
31377
  rowIndex,
31378
31378
  columnIndex,
31379
+ width: 1e3,
31379
31380
  type: "row-cell"
31380
31381
  }));
31381
31382
  td.innerHTML = html;
@@ -32089,11 +32090,15 @@ var __publicField = (obj, key, value) => {
32089
32090
  lastRowStart.current = rowStart;
32090
32091
  }
32091
32092
  }, [rowStart, onItemsRendered]);
32093
+ const CellWithWidth = (args) => {
32094
+ const width = columnWidth(args.columnIndex);
32095
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Cell, { ...args, width });
32096
+ };
32092
32097
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ContextMenu, { modal: false, onOpenChange: setContextMenuOpen, children: [
32093
32098
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenuTrigger, { as: ContextMenu.Trigger, ref: mergeRefs([forwardedRef, containerRef]), tabIndex: 0, onMouseDown, onMouseMove, onKeyDown, onPointerDown, onPointerUp, onPointerLeave: setPointerCapture, onPointerEnter: setPointerCapture, onContextMenu, $rounded: rounded, $height: autoHeight ? rowCount * rowHeight + (showHeader ? headerHeight : 0) + elementBorderRef.current.scrollBarHeight : void 0, $showBorder: showBorder, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AutoSizer, { onResize, children: ({
32094
32099
  height,
32095
32100
  width
32096
- }) => /* @__PURE__ */ jsxRuntimeExports.jsx(VariableSizeGrid, { ref: forwardedGridRef ? mergeRefs([forwardedGridRef, gridRef]) : gridRef, height, width, columnCount, rowHeight: () => rowHeight, useIsScrolling, innerElementType: InnerElementType, itemData: data, initialScrollTop: focus.row < rowStart ? focus.row * rowHeight : (focus.row - rowStart) * rowHeight, initialScrollLeft: getColumnHorizontalPosition(focus.column), columnWidth, rowCount, onScroll, outerRef, outerElementType: OuterElementType, onItemsRendered, ...props, children: Cell }) }) }),
32101
+ }) => /* @__PURE__ */ jsxRuntimeExports.jsx(VariableSizeGrid, { ref: forwardedGridRef ? mergeRefs([forwardedGridRef, gridRef]) : gridRef, height, width, columnCount, rowHeight: () => rowHeight, useIsScrolling, innerElementType: InnerElementType, itemData: data, initialScrollTop: focus.row < rowStart ? focus.row * rowHeight : (focus.row - rowStart) * rowHeight, initialScrollLeft: getColumnHorizontalPosition(focus.column), columnWidth, rowCount, onScroll, outerRef, outerElementType: OuterElementType, onItemsRendered, ...props, children: CellWithWidth }) }) }),
32097
32102
  /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenu.Content, { children: menuOptions.map((option, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenu.Item, { onSelect: option.onSelect, children: option.label }, `grid-${index2}`)) })
32098
32103
  ] });
32099
32104
  });
@@ -47300,7 +47305,8 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
47300
47305
  }
47301
47306
  },
47302
47307
  shadow: {
47303
- "default": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)"
47308
+ "default": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)",
47309
+ reverse: "5px 0 20px 0 rgba(0, 0, 0, 0.08), 6px 0 10px 0 rgba(0, 0, 0, 0.08)"
47304
47310
  },
47305
47311
  size: {
47306
47312
  "default": {
@@ -47943,7 +47949,8 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
47943
47949
  const shadow = {
47944
47950
  "1": "0 4px 6px -1px lch(6.77 0 0 / 0.15), 0 2px 4px -1px lch(6.77 0 0 / 0.15)",
47945
47951
  "2": "0 4px 4px 0 rgba(88, 92, 98, 0.06), inset 5px 0 10px 0 rgba(104, 105, 111, 0.1)",
47946
- "3": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)"
47952
+ "3": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)",
47953
+ "4": "5px 0 20px 0 rgba(0, 0, 0, 0.08), 6px 0 10px 0 rgba(0, 0, 0, 0.08)"
47947
47954
  };
47948
47955
  const breakpoint = {
47949
47956
  sizes: {
@@ -1,4 +1,8 @@
1
1
  import { GridChildComponentProps } from 'react-window';
2
2
  import { ItemDataType } from './types';
3
3
 
4
- export declare const Cell: import('react').MemoExoticComponent<({ data, rowIndex, columnIndex, style, ...props }: GridChildComponentProps<ItemDataType>) => import("react/jsx-runtime").JSX.Element>;
4
+ type CellProps = GridChildComponentProps<ItemDataType> & {
5
+ width: number;
6
+ };
7
+ export declare const Cell: import('react').MemoExoticComponent<({ data, rowIndex, columnIndex, style, ...props }: CellProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export {};
@@ -9,10 +9,12 @@ interface CellCommonProps extends HTMLAttributes<HTMLElement> {
9
9
  interface CellHeaderProps extends CellCommonProps {
10
10
  rowIndex?: never;
11
11
  type: "header-cell";
12
+ width: number;
12
13
  }
13
14
  interface CellBodyProps extends CellCommonProps {
14
15
  rowIndex: number;
15
16
  type: "row-cell";
17
+ width: number;
16
18
  }
17
19
  type CellComponentProps = CellHeaderProps | CellBodyProps;
18
20
  export type CellProps = ComponentType<CellComponentProps>;
@@ -2479,6 +2479,7 @@ export interface Theme {
2479
2479
  };
2480
2480
  "shadow": {
2481
2481
  "default": string;
2482
+ "reverse": string;
2482
2483
  };
2483
2484
  "size": {
2484
2485
  "default": {
@@ -3122,6 +3123,7 @@ export interface Theme {
3122
3123
  "1": string;
3123
3124
  "2": string;
3124
3125
  "3": string;
3126
+ "4": string;
3125
3127
  };
3126
3128
  "breakpoint": {
3127
3129
  "sizes": {
@@ -2478,7 +2478,8 @@ declare const _default: {
2478
2478
  }
2479
2479
  },
2480
2480
  "shadow": {
2481
- "default": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)"
2481
+ "default": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)",
2482
+ "reverse": "5px 0 20px 0 rgba(0, 0, 0, 0.08), 6px 0 10px 0 rgba(0, 0, 0, 0.08)"
2482
2483
  },
2483
2484
  "size": {
2484
2485
  "default": {
@@ -3121,7 +3122,8 @@ declare const _default: {
3121
3122
  "shadow": {
3122
3123
  "1": "0 4px 6px -1px lch(6.77 0 0 / 0.15), 0 2px 4px -1px lch(6.77 0 0 / 0.15)",
3123
3124
  "2": "0 4px 4px 0 rgba(88, 92, 98, 0.06), inset 5px 0 10px 0 rgba(104, 105, 111, 0.1)",
3124
- "3": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)"
3125
+ "3": "-5px 0 20px 0 rgba(0, 0, 0, 0.08), -6px 0 10px 0 rgba(0, 0, 0, 0.08)",
3126
+ "4": "5px 0 20px 0 rgba(0, 0, 0, 0.08), 6px 0 10px 0 rgba(0, 0, 0, 0.08)"
3125
3127
  },
3126
3128
  "breakpoint": {
3127
3129
  "sizes": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickhouse/click-ui",
3
- "version": "0.0.147",
3
+ "version": "v0.0.149",
4
4
  "description": "Official ClickHouse design system react library",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -32,6 +32,7 @@
32
32
  "test": "vitest",
33
33
  "dev": "vite",
34
34
  "generate-tokens": "node build-tokens.js",
35
+ "typecheck": "tsc --noEmit",
35
36
  "build": "tsc && vite build",
36
37
  "build:watch": "watch 'npm run build' ./src",
37
38
  "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",